javascript当中history的用法

6.history
例 1.6(firstIEFF.html)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>

</HEAD>

<BODY>
<A HREF="second.html">进入second.html</A>
</BODY>
</HTML>
second.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<TITLE> New Document </TITLE>

<SCRIPT LANGUAGE="JavaScript">
<!--
/*Window.history (Property)
This property returns a history object for this window.

Property/method value type:    History object
JavaScript syntax:    -    history
-    myWindow.history

.*/
window.οnlοad=function(){
    var num = Math.round(Math.random()*100);

    document.getElementById("num").innerHTML=num;
}
//-->
</SCRIPT>
</HEAD>

更多内容请见原文,文章转载自:https://blog.csdn.net/qq_43650923/article/details/103045998

posted @ 2021-11-29 18:08  malala  阅读(93)  评论(0编辑  收藏  举报