htmlValidate中testRemind插件使用Chrome浏览器UI实例页面
回到相关文章 »代码:
HTML代码:
<input type="email" id="email" placeholder="任意内容" /> <input type="button" id="button" value="点击测试" />
JS代码:
$("#button").bind("click", function() {
$("#email").testRemind("无论输入什么,都不合格!", {
size: 10,
css: {
padding: "8px 10px",
borderColor: "#aaa",
borderRadius: 8,
boxShadow: "2px 2px 4px rgba(0,0,0,.2)",
background: "#fff url(chrome-remind.png) no-repeat 10px 12px",
backgroundColor: "#fff",
fontSize: 16,
textIndent: 20
}
}).get(0).focus();
});