我在表单上使用了一个按钮.点击该链接后如何链接到其他网页/文件?这是我尝试过的代码,但不起作用.
<button class="btn" data-bind="click: function() { document.location.href=$(this).attr('RiskAssessmentMain.aspx'); }">back</button>
Run Code Online (Sandbox Code Playgroud)
Ahm*_*ıcı 15
<input type='button'value='back' class="btn" onclick="document.location.href='RiskAssessmentMain.aspx';"/>
Run Code Online (Sandbox Code Playgroud)
试试吧:http: //jsfiddle.net/wzy4B/
<form> 在action属性中设置你想要进入的url 。然后使用 asubmit代替button.
这是一个例子:
<form action="http://google.com">
<input type="submit" value="Google">
</form>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
60508 次 |
| 最近记录: |