
javascript
温 潭
好好生活,好好学习,不出什么意外的话,我们终将故去。
展开
-
用JavaScript解决Placeholder的IE8兼容问题
if( !('placeholder' in document.createElement('input')) ){ $('input[placeholder],textarea[placeholder]').each(function(){ var that = $(this), text= that.attr('placeholder')转载 2016-02-26 13:11:58 · 3817 阅读 · 0 评论 -
js判断两个数组中元素的包换关系
/*a数组是否包含b数组*/ function isContained(a, b){ if(!(a instanceof Array) || !(b instanceof Array)) return false; var i = 0, lengthOfA = a.length, j = 0, lengthOfB = b.length; if(lengthOfA <原创 2018-01-22 10:31:22 · 944 阅读 · 0 评论