Posts

Showing posts from September, 2013

JavaScript 1: history object

The top most object in the Browser Object Model (BOM) is the “window”. I have three files history.html:  Start file1.html: Middle file2.html: Last In the Start, you can click the “go to middle” to visit the page file1.html. In this page you have two buttons, when you click “Back” it should take you back to the history.html, otherwise you can go to the last page click by “go to end”. In the “End” page you can go to the page entering -2 for “Start” or –1 for “Middle”. <!DOCTYPE html> <html> <head> </head> <body> <h1>Start</h1> <a href="file1.html">go to middle</a> </body> </html> As shown in the above code, there is just one link to go to the middle page. <!DOCTYPE html> <html> <head> <title></title> </head> <body> <h1> In the Middle, one to go</h1> <a href="file2.html">go to end</a> <input type=...