1. Dynamic key gets the corresponding value in an object
JS in a dynamic key to get the corresponding value of an object has two methods:
1 var key = "name1"; var value =2var key = "name1"; var value = eval ("obj." +key);
2, Javascript:history.go () and History.back () the Difference and application
1 <inputtype= ' button 'value= ' Refresh 'onclick= "Window.location.reload ()"> 2 <inputtype= ' button 'value= ' Forward 'onclick= "Window.history.go (1)"> 3 <inputtype= ' button 'value= ' Back 'onclick= "Window.history.go ( -1)"> 4 <inputtype= ' button 'value= ' Forward 'onclick= "Window.history.forward ()"> 5 <inputtype= ' button 'value= ' Back 'onclick= "Window.history.back ()"> 6 <inputtype= ' button 'value= ' back + Refresh 'onclick= "Window.history.go ( -1); Window.location.reload ()">
3. How to open a new webpage
window.open ("a.html"); // just indicates the new window opens the page, does not refresh the current page window.location.href= "a.html"; // indicates that a new page is opened and refreshed on the current page
JS Common code Record