Similar to the prompts in Sina mail. Relatively independent. With the help of the wenming moderator, the high adaptability BUG has been solved. The usage is simple. On the page that requires a prompt, reference the alert. js script file, for example:
Program code
<Script type = "text/javascript" src = "alert. js"> </script>
Then, use it directly as needed:
Program code
SAlert ("information to be prompted ");
No additional HTML code is required.
Complete code:
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <ptml xmlns = "http://www.w3.org/1999/xhtml" xml: lang = "zh-CN" lang = "zh-CN"> <pead> <title> script home </title> <meta http-equiv = "Content-Type" content =" text/html; charset = gb2312 "/> <meta http-equiv =" Content-Language "content =" gb2312 "/> <style type =" text/css "> * {margin: 0; padding: 0 ;} </style> </pead> <body> <p> test </p> <p> test </p> <p> test </p> <p> test </p> <p> test </p> <input type = "button" value = "Click here" onclick = "sAlert ('test result '); "/> </body> </ptml>
[Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]