Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/405.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript onclick=";parent.location在firefox和Chrome中不起作用 客户信息 客户地址 帐单地址 送货地址_Javascript_Jsp - Fatal编程技术网

Javascript onclick=";parent.location在firefox和Chrome中不起作用 客户信息 客户地址 帐单地址 送货地址

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>

“#CustomerInformation”表示此脚本将跳转到同一页面的点。但它在IE中运行良好,但在firefox和Chrome中不起作用。当单击onclcik按钮时,它将关闭当前页面并转到主页。我喜欢document.location,但运气不好。。。请帮助如何改为窗口位置?


<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';">