手机网站keyup解决方案
摘要:模糊搜索keyup无效,解决方案如下 //手机网站解决keyup的方法 $(function () { $('#repairsearch').bind('focus', filter_time); }); var str = ''; //传入参数 var now = ''; filter_time
阅读全文
posted @
2016-05-31 11:43
李九妹
阅读(625)
推荐(0)
js urlencode , encodeURIComponent
摘要:js 对文字进行编码涉及3个函数:escape,encodeURI,encodeURIComponent,相应3个解码函数:unescape,decodeURI,decodeURIComponent 1、 传递参数时需要使用encodeURIComponent,这样组合的url才不会被#等特殊字符截
阅读全文
posted @
2016-02-25 11:31
李九妹
阅读(1074)
推荐(0)
js 设为首页、加入收藏
摘要:// 加入收藏 加入收藏function AddFavorite(sURL, sTitle) { try { window.external.addFavorite(sURL, sTitle); } catch (e) { try { window.sidebar.addPanel(sTitle, ...
阅读全文
posted @
2015-04-18 17:52
李九妹
阅读(539)
推荐(0)
javascript转换.net DateTime方法 (比如转换\/Date(1426056463000)\/)
摘要:function getDate(str_time) { var re = new RegExp('\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/'); var r = (str_time || '').match...
阅读全文
posted @
2015-03-11 18:42
李九妹
阅读(997)
推荐(0)
JS定时跳转URL并输出剩余秒数
摘要:1.[代码][JavaScript]代码 1234567891011121314151617181920212223242526
阅读全文
posted @
2014-12-02 16:22
李九妹
阅读(244)
推荐(0)
设置checkbox为只读(readOnly)
摘要:方式一:checkbox没有readOnly属性,如果使用disabled=“disabled”属性的话,会让checkbox变成灰色的,用户很反感这种样式可以这样让它保持只读:设置它的onclick=‘’return false“js里就是 checkbox.onclick=function(){return false;};方式二:
阅读全文
posted @
2014-04-02 10:50
李九妹
阅读(792)
推荐(0)