标签:style color io ar for sp on cti ef
function focusInputEle(o) { if (o.value == getAttributeValue(o, ‘defaultVal‘)) { o.value = ‘‘; o.style.color = "#000000"; } } function blurInputEle(o) { if (o.value == ‘‘) { o.value = getAttributeValue(o, ‘defaultVal‘); o.style.color = "#999999"; } } function getAttributeValue(o, key) { if (!o.attributes) return null; var attr = o.attributes; for ( var i = 0; i < attr.length; i++) { if (key.toLowerCase() == attr[i].name.toLowerCase()) return attr[i].value; } return null; }标签:style color io ar for sp on cti ef
原文地址:http://www.cnblogs.com/love-you-girl/p/4019545.html