在text 里敲回车不执行 location.href
一个text 一个IMG执行同一个方法 点img执行正常 但是在text里敲回车就不能跳转,我加了个alert测试,敲回车也能正常弹出txtText的值,也就是说在location.href之前的语句都执行了,但是没跳转,请教是为什么
function Search() { if(document.all.txtText.value!="") { alert(document.all.txtText.value);//测试是否进来了 location.href = "SearchProduct.aspx?name="+document.all.txtText.value; } } <td ur2 =