我如何确保这不会在新窗口中打开?根据以前的选择使用Javascript选择框
onclick="ob=this.form.table;window.open(ob.options[ob.selectedIndex].value)"/>
我如何确保这不会在新窗口中打开?根据以前的选择使用Javascript选择框
onclick="ob=this.form.table;window.open(ob.options[ob.selectedIndex].value)"/>
,如果你想在你需要写
onclick="ob=this.form.table;window.location.href=(ob.options[ob.selectedIndex].value)"/>
你希望它在同一个窗口中打开?
如果是使用window.location
你应该将其替换为:
onclick="ob=this.form.table;document.location=ob.options[ob.selectedIndex].value;"/>
Window.open()打开一个新窗口; document.location更改当前窗口中的页面。
哼并没有工作在同一窗口中打开必须与我的JavaScript编码的问题... – 2010-03-18 15:17:03