http://community.csdn.net/Expert/topic/5766/5766557.xml?temp=3.187197E-02
------解决方案--------------------------------------------------------
改改yahoo的代码就好了,form是不能嵌套的,把yahoo的代码改成下面的,效果是一模一样的:
<script language= "javascript " type= "text/javascript ">
function yahooSearch(){
url = "http://search.union.yahoo.com.cn/click/search.htm?m=419326&b=&p=1006&a=&st=0&fw=union&name= ";
obj = document.getElementById( 'searchName ');
if (obj.value == '请输入关键字 '){
obj.focus();
obj.value = ' ';
return false;
}
url = url + encodeURIComponent(obj.value);
window.open(url);
}
</script>
<input id= "searchName " name= "name " type= "text " style= "width:210px; *margin-right:.5em; " value= "请输入关键字 " onMouseOver= "this.focus() " onBlur= "if (value == ' '){value= '请输入关键字 '} " onFocus= "this.select() " onClick= "if(this.value== '请输入关键字 ')this.value= ' ' "/>
<input type= "button " onclick= "yahooSearch(); " value= "搜索 " />