$(document).ready(function() { $("#scbar_btn").click(function() { window.open ('http://www.dtnews.cn/so/index.aspx?z='+$("#z").val()+'&mod=news') }); }); function sousuo_tips() { if(document.getElementById("z").value=="大同") { document.getElementById("z").className="textcon"; document.getElementById("z").value=""; } } function sousuo_tips2() { if(document.getElementById("z").value=="") { document.getElementById("z").className="textcon"; document.getElementById("z").value="大同"; } }