0

不知道为什么这不起作用。http://jsfiddle.net/PXrzh/

<button onclick="go()" >go</button>

js

function go() {
   window.location.href = "Confirmation.html";
}
4

1 回答 1

0
<html>
    <script type="text/javascript">
        function go() {
            window.location.href = "Confirmation.html";
        }
    </script>
    <body>
        <button onclick="go()" >go</button>
    </body>
</html>

没发现问题...

更新

index.js

function go() {
    window.location.href = "Confirmation.html";
}

索引.html

<html>
    <script type="text/javascript" src="index.js"></script>
    <body>
        <button onclick="go()" >go</button>
    </body>
</html>

仍然没有问题...

于 2013-11-05T16:44:23.520 回答