JavaScript 창 기록

JavaScript Window History

window.history 객체에는 브라우저 기록이 포함되어 있습니다.

Window History

window.history 개체는 작성할 때 창 접두어를 사용할 필요가 없습니다.

사용자 개인 정보를 보호하기 위해 이 객체에 액세스하는 JavaScript의 방법이 제한됩니다.

일부 방법:

history.back() - 브라우저에서 뒤로 버튼을 클릭하는 것과 동일합니다. 기록 목록에서 이전 URL을 로드합니다.

이것은 브라우저에서 뒤로 버튼을 클릭하는 것과 같습니다:

페이지에 뒤로 버튼 만들기:

<html>
<mate charset="utf-8">
<head>
<script>
function goBack()
  {
  window.history.back()
  }
</script>
</head>
<body>
<input type="button" value="返回" onclick="goBack()">
</body>
</html>

Window History Forward

history forward() 메소드는 기록 목록에서 다음 URL을 로드합니다. 이것은 브라우저에서 앞으로 버튼을 클릭하는 것과 같습니다:

페이지에 앞으로 버튼을 만듭니다:

<html>
<mate charset="utf-8">
<head>
<script>
function goForward() 
 { 
  window.history.forward() 
   }
</script>
</head>
<body>
  <input type="button" value="下页" onclick="goForward()">
</body>
</html>

지속적인 학습
||
<html> <mate charset="utf-8"> <head> <script> function goBack() { window.history.back() } </script> </head> <body> <input type="button" value="返回" onclick="goBack()"> </body> </html>
회사 소개 부인 성명 Sitemap
PHP 중국어 웹사이트:공공복지 온라인 PHP 교육,PHP 학습자의 빠른 성장을 도와주세요!