History Object

Hostory Object ជា​វត្ថុ​មួយ​ទៀត​នៅ​ក្នុង​ BOM (Browser Object Model) ដែល​នៅ​ក្នុង​នោះ​មាន​វិធី​ចំនួន ៣ ប្រើ​សំរាប់​បើ​ទំព័រ browser ទៅ​មុខ​ ទៅ​ក្រោយ ​បើក​ដដែល​ម្តង​ទៀត (refresh page) ឬ​ទៅ​មុខ​ទៅ​ក្រោយ​ជា​ច្រើន​ទំព័រ​។ ពិនិត្យ​កម្មវិធី​ខាង​ក្រោម​នេះ៖
<!DOCTYPE html>
<html>
  <head>
    <link href='https://fonts.googleapis.com/css?family=Odor+Mean+Chey' rel='stylesheet'>
  </head>
  <body style="font:14px/1.5 'Odor Mean Chey'">
  	

​ចុច​នៅ​​ទី​នេះ​ ដើម្បី​បើ​ក​​ទំព័រ​នេះ​ម្តង​ទៀត (refresh) ។

<script> function myFunction() { history.go(); } </script> </body> </html>

​ចុច​នៅ​​ទី​នេះ​ ដើម្បី​បើ​ក​​ទំព័រ​នេះ​ម្តង​ទៀត (refresh) ។


Property Description
back() Loads the previous URL in the history list
forward() Loads the next URL in the history list
go() Loads a specific URL from the history list