摘要: if( !('placeholder' in document.createElement('input')) ){ $('input[placeholder],textarea[placeholder]').each(function(){ var that = $(this), ... 阅读全文
posted @ 2016-12-25 20:23 以茜为贵 阅读(1546) 评论(0) 推荐(0) 编辑
摘要: //参数:mystr传入的字符串 //返回:字符串 mystr function trim(mystr){ while ((mystr.indexOf(" ")==0) && (mystr.length>1)){ mystr=mystr.substring(1,mystr.length); }//去除前面空格 while ((mystr.la... 阅读全文
posted @ 2016-12-25 20:21 以茜为贵 阅读(1683) 评论(0) 推荐(0) 编辑
摘要: 这式另一种方式,可以去除字符串中所有的空格。 阅读全文
posted @ 2016-12-25 20:19 以茜为贵 阅读(292) 评论(0) 推荐(0) 编辑
摘要: $(function(){ var sUserAgent = navigator.userAgent.toLowerCase(); var bIsIpad = sUserAgent.match(/ipad/i) == "ipad"; var bIsIphoneOs = sUserAgent.match(/iphone os/i) == ... 阅读全文
posted @ 2016-12-25 20:14 以茜为贵 阅读(526) 评论(0) 推荐(1) 编辑
摘要: /*移除HTML5 input在type="number"时的上下小箭头*/ input::-webkit-outer-spin-button, input::-webkit-inner-spin-button{ -webkit-appearance: none; margin: 0; } input[type="number"]{-moz-appearance:textfiel... 阅读全文
posted @ 2016-12-25 20:06 以茜为贵 阅读(312) 评论(0) 推荐(0) 编辑