Javascript onclick=";parent.location在firefox和Chrome中不起作用 客户信息 客户地址 帐单地址 送货地址
“#CustomerInformation”表示此脚本将跳转到同一页面的点。但它在IE中运行良好,但在firefox和Chrome中不起作用。当单击onclcik按钮时,它将关闭当前页面并转到主页。我喜欢document.location,但运气不好。。。请帮助如何改为窗口位置?Javascript onclick=";parent.location在firefox和Chrome中不起作用 客户信息 客户地址 帐单地址 送货地址,javascript,jsp,Javascript,Jsp,“#CustomerInformation”表示此脚本将跳转到同一页面的点。但它在IE中运行良好,但在firefox和Chrome中不起作用。当单击onclcik按钮时,它将关闭当前页面并转到主页。我喜欢document.location,但运气不好。。。请帮助如何改为窗口位置? <A ID ="CustomerInformation"></A> <table class="SectionHeader1"> <TBODY>
<A ID ="CustomerInformation"></A>
<table class="SectionHeader1">
<TBODY>
<tr>
<td>Customer Information</td>
</tr>
</TBODY>
</table>
<TABLE class="TheBox" align="center">
<TBODY>
<TR>
<TD>
<FIELDSET><LEGEND>Customer Address</LEGEND>
<DIV align="center">
<TABLE id="table5" class="BoxedIn">
<TBODY>
<TR>
<TH colspan="3" width="50%">Billing Address</TH>
<TH colspan="5" width="50%">Shipping Address</TH>
</TR>
</TR>
</TBODY>
</TABLE>
</DIV>
</FIELDSET>
</TD>
</TR>
</TBODY>
</TABLE>
<INPUT type="button" value="Customer Details"
class="buttonSuper" name="customerDetails"
onclick="parent.location='#CustomerInformation'">
这就是你想要做的
编辑:使用location.href这是什么类型的语句?由于我的UI结构,我不能像bcz那样使用。bcz有许多表相互连接。这不是真正有效的-你不能在
元素(或任何其他交互内容)中放置按钮。
<INPUT type="button" value="Customer Details" class="buttonSuper" name="customerDetails" onclick="location.href='#CustomInformation';">