ITeye博客

pigaps的博客

pigaps · 共 1 篇文章

placeholder兼容

//兼容placeholder nodes: 需要兼容的元素,placeholder里面字体的颜色 function placeholder(nodes, itemColor) { /** * 判断浏览器是否支持placeholder * !("placeholder" in document.createElement("input") ----浏览器不支持placeholder属性 / if (nodes.length && !("placeholder" in document.createElement("input"))) { for (var i = 0; i < nodes.l…

2015-04-03 18:04 · 评论(0)