<input id="otxt" type="text" />
<script>
function onSub(){
alert('验证');
}
var timer =null
document.getElementById('otxt').onkeyup =function(){
clearTimeout(timer);
timer = setTimeout(onSub, 2000);
}
</script>
分类目录归档:前端
JavaScript正则表达式验证邮箱地址
提示:你可以先修改部分代码再运行。
Email:
Styling Disabled Buttons
input[disabled] {
border: 1px solid #999;
background-color: #ddd;
}
提示:你可以先修改部分代码再运行。
aspx.net中i18n国际化JavaScript中的字符串
alert(‘<asp:Localize ID="EmailFomatInvalid" runat="server" meta:resourcekey="EmailFomatInvalid" />’, ‘lbl_email’);
在资源文件中定义各种语言的文本内容即可