02 2016 档案
jquery 失去焦点时输入框为空时自动填写默认内容
摘要:1 $("#address").focus(function () { // 地址框获得鼠标焦点 2 var txt_value = $(this).val(); // 得到当前文本框的值 3 if (txt_value == "请输入邮箱地址") { 4 $(this).val(""); // 如 阅读全文
posted @ 2016-02-29 18:41 月落无声 阅读(1799) 评论(0) 推荐(0)
移动端左右滑动代码
摘要://左右滑动切换 var nStartY; var nStartX; var nChangY; var nChangX; document.getElementsByTagName('body')[0].addEventListener('touchstart',function(e){ nStar 阅读全文
posted @ 2016-02-25 14:41 月落无声 阅读(1632) 评论(0) 推荐(0)