second, the use of IFRAME, by modifying the iframe.src to produce historical view source print?
04 |
<meta charset= "Utf-8"/> |
08 |
<input type= "button" value= "plus 1" onclick= "Add ()"/> |
09 |
<div id= "Info" style= "border:red 1px solid;width:200px;padding:10px;margin:5px;" >0</div> |
13 |
<script src= "History-0.2.js" ></script> |
15 |
var info = document.getElementById (' info '); |
28 |
History.push ({param:0, func:func}); |
More than a blank.html, is an empty HTML shelf, no JS logic code, the following view source print?
4 |
<title>blank.html</title> |
Each AJAX operation appends a number to the IFRAME.SRC question mark to record history. Click the Back button, iframe in the OnLoad event to obtain the URL of the IFRAME, according to the number after the question mark to fetch records.
All browsers support this method. The disadvantage is that if there are other IFrame in the main page, and the SRC is modified. Historical management can be confusing.
History-0.2.js Category: Ajax/sjax