Home > front end >  Guidance of this piece of code, don't know where to go wrong, why not implemented: page 3 to re
Guidance of this piece of code, don't know where to go wrong, why not implemented: page 3 to re

Time:10-21


page 1 code:


<meta charset="utf-8" & gt;
<meta name="viewport" content="width=device - width, initial - scale=1.0" & gt;
Page 1 & lt;/title> <br/></head> <br/><body> <br/><A href="https://bbs.csdn.net/topics/2. page 2. The HTML" id="page2" & gt; Go to page 2 & lt;/a> <br/><script> <br/>Var page2=document. GetElementById (" page2 "); <br/>A.o nclick=function () {<br/>Window. The open (" 2. Page 2. HTML ", "2. Page 2"); <br/>} <br/></script> <br/></body> <br/></html> <br/><br/><br/><br/><strong> page 2 code: </strong> <span style="font - size: 24 px;"> </span> <br/><! DOCTYPE html> <br/><HTML lang="en" & gt; <br/><head> <br/><meta charset="utf-8" & gt; <br/><meta name="viewport" content="width=device - width, initial - scale=1.0" & gt; <br/><title> Page 2 & lt;/title> <br/></head> <br/><body> <br/><A href="https://bbs.csdn.net/topics/3-3 programming practice - the index" id="page3" & gt; Back to the page 3 & lt;/a> <br/><br> <br/><Input type="button" value="https://bbs.csdn.net/topics/back to page 1" id="page1"/& gt; <br/><script> <br/>Var page3=document. GetElementById (" page3 "); <br/>Var page1=document. GetElementById (" page1 "); <br/>Page3. Onclick=function () {<br/>Window. The open (' 3-3 programming exercises - index. HTML ', '3-3 programming exercises'); <br/>} <br/>Page1. Onclick=function () {<br/>History. Go (1); <br/>} <br/></script> <br/></body> <br/></html> <br/><br/><br/><br/><strong> page 3 code: </strong> <span style="font - size: 24 px;"> </span> <br/><! DOCTYPE html> <br/><HTML lang="en" & gt; <br/><head> <br/><meta charset="utf-8" & gt; <br/><title> Document

<body>
<script>
Var page1=document. GetElementById (' page1);
Var page2=document. GetElementById (' page2);
Page1. Onclick=function () {
History. The go (2);//jump to page 1 that does not implement
};
Page2. Onclick=function () {
History. Go (1);//jump to page 2 of this does not implement
};
</script>




only page jump to page 2 and page 3 1 does not implement, don't know what to write wrong,
  • Related