- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Execute a script when the window's history changes in HTML?
When the window’s history change, the onpopstate event triggers. You can add it like this −
Example
<!DOCTYPE html> <html> <body onpopstate = "onpopstateFunction()"> <p>This is demo text</p> </body> </html>
- Related Articles
- Execute a script when the browser window is closed in HTML?
- Execute a script when the cue changes in a element in HTML?
- Execute a script when an element's scrollbar is being scrolled in HTML?
- Execute a script when the length of the media changes in HTML?
- Execute a script when the browser window is being resized in HTML?
- Execute a script each time the playback rate changes in HTML?
- Execute a script when there have been changes to the anchor part of the URL in HTML?
- Execute a script when the file is unavailable in HTML?
- Execute a script when the element is invalid in HTML?
- Execute a script when the element loses focus in HTML?
- Execute a script when the element gets focus in HTML?
- Execute a script when a page has unloaded in HTML?
- Execute a script when the element is being dragged in HTML?
- Execute a script when the element is being clicked in HTML?
- Execute a script when the element is finished loading in HTML?

Advertisements