Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
47
rated 0 times [  48] [ 1]  / answers: 1 / hits: 86733  / 12 Years ago, fri, february 8, 2013, 12:00:00

I am using a button on my form. How do I link to another web page/file when clicking on that link? Here is the code I tried, but does not work.



<button class=btn data-bind=click: function() { document.location.href=$(this).attr('RiskAssessmentMain.aspx'); }>back</button>

More From » javascript

 Answers
13
<input type='button'value='back' class=btn onclick=document.location.href='RiskAssessmentMain.aspx';/>


Try it:
http://jsfiddle.net/wzy4B/


[#80354] Wednesday, February 6, 2013, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tobyl

Total Points: 598
Total Questions: 110
Total Answers: 114

Location: Vietnam
Member since Sat, Feb 12, 2022
2 Years ago
tobyl questions
Tue, Aug 10, 21, 00:00, 3 Years ago
Wed, Jan 13, 21, 00:00, 3 Years ago
Tue, Dec 1, 20, 00:00, 4 Years ago
;