setTimeout(plho,1000);
function plho(){
//判断浏览器是否支持placeholder属性
supportPlaceholder='placeholder'in document.createElement('input');
if(!supportPlaceholder){
var text = document.getElementById("searchInput").placeholder
document.getElementById("searchInput").value = text
document.getElementById("searchInput").style.color = "#999"
document.getElementById("searchInput").attachEvent("onfocus",add);
}
}
function add(){
document.getElementById("searchInput").value =""
document.getElementById("searchInput").style.color="#000"
}
function plho(){
//判断浏览器是否支持placeholder属性
supportPlaceholder='placeholder'in document.createElement('input');
if(!supportPlaceholder){
var text = document.getElementById("searchInput").placeholder
document.getElementById("searchInput").value = text
document.getElementById("searchInput").style.color = "#999"
document.getElementById("searchInput").attachEvent("onfocus",add);
}
}
function add(){
document.getElementById("searchInput").value =""
document.getElementById("searchInput").style.color="#000"
}