1.邮件格式验证:
<script type="text/javascript">
function checkMail(){
var email = document.getElementById('txtmail').value;
if (!email.match( /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/ )){
alert("邮件格式不正确!");
}
}
</script>
2. window.open(url,target,"left=0,top=0,height=300,width=400,resizable=yes,scrollable=yes,toolbar=yes,status=yes,location=yes")
3.js 控制disabled,readOnly 属性
(1)写法 document.all.btnEditor.disabled = 'false';
document.all.btnEditor.disabled = 'ture';
(false,true要用单引号扩起来)
(2) document.all.catentryName.readOnly=false;
document.all.catentryName.readOnly=true;
( false,true不要用单引号扩起来)
(readOnly 不要写成readonly)