离开画面时的JavaScript确认提示
window.onbeforeunload = function (evt) {
var message = 'Are you sure you want to leave?';
if (typeof evt == 'undefined') {
evt = window.event;
}
if (evt) {
evt.returnValue = message;
}
return message;
}
onbeforeunload 事件参考地址
http://msdn.microsoft.com/en-us/library/ms536907(VS.85).aspx
相关文档:
<html>
<head>
<mce:script type = "text/javascript"><!--
function changetext()
{
var x = document.getElementById("list");
for (var i = 0;i < x.length;i++ )
{
if (x.options[i].selected)
{
document.getElemen ......
<html>
<head>
<mce:style><!--
.tvline{width:240px;height:180px;border:0;}
.tvline td{border-top:1 solid #000000;font:1px;filter:alpha(opacity=30)}
--></mce:style><style mce_bogus="1"> .tvline{width:240p ......
密码已经是我们生活工作中必不可少的工具,但一个不安全的密码有又有可能会给我们造成不必要的损失。作为网站设计者,如果我们在网页中能对用户输入的密码进行安全评估,并显示出相应的提示信息,那么对用户设置一个安全的密码将有很大帮助。同时也使得网站更具人性化,更有吸引力.
什么是一个安全的密码呢 ......
正则表达式
RegExp(regexp, option)类实现,可以简写成/regexp/option
option:
g: global, i: ignore case
方法:string.test(regexp),
string.exec(regexp)[返回所有匹配的地方], string.serch(regexp)[正则版的indexOf()],
string.replace(regexp, str|funtion), string.split(regexp)
简单模式
元字符:( [ {
......
var sDate = new Date(Date.UTC(arys[0], arys[1] - 1, arys[2]));
var eDate = new Date(Date.UTC(arys1[0], arys1[1] - 1, arys1[2]));
......