Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
77
rated 0 times [  79] [ 2]  / answers: 1 / hits: 18648  / 10 Years ago, wed, july 23, 2014, 12:00:00

I have two html file index.html and test.html and I want to navigate from index to test when pressing a button.



I tried this but it is not working well .



function change_page(){
console.log(change_page);
$('body').load( test.html);
}


<input type=button value=create page onclick=change_page();/>


If you know some better way, please tell me.


More From » html

 Answers
24
function change_page(){
window.location.href = test.html;
}


<input type=button value=create page onclick=change_page()/>

[#70087] Monday, July 21, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kevonmoisesf

Total Points: 693
Total Questions: 101
Total Answers: 128

Location: Reunion
Member since Mon, Dec 28, 2020
3 Years ago
kevonmoisesf questions
Sat, Jan 23, 21, 00:00, 3 Years ago
Tue, Feb 18, 20, 00:00, 4 Years ago
Wed, Jun 12, 19, 00:00, 5 Years ago
;