onclick =" parent.location在firefox和Chrome中无效 [英] onclick="parent.location is not working in firefox and Chrome

查看:77
本文介绍了onclick =" parent.location在firefox和Chrome中无效的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

'#CustomerInformation'表示此脚本将跳转到同一页面的位置。但是它正常工作很好的IE浏览器但不是没有工作firefox和Chrome ..当点击onclcik按钮它关闭当前页面并转到主页。我厌倦了document.location但没有运气...请帮助

The '#CustomerInformation' denotes the point where this script will jump to means same page.But it working fine in IE but not not working firefox and Chrome ..when click on onclcik button it is closing current page and go to main page.I tired like document.location and but no luck... Please help

推荐答案

<INPUT type="button" value="Customer Details" class="buttonSuper" name="customerDetails" onclick="location.href='#CustomInformation';"> 

这就是你要做的。

编辑:使用location.href

Edit: using location.href

这篇关于onclick =&quot; parent.location在firefox和Chrome中无效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆