在HTML中視窗的歷史記錄更改時執行指令碼?
當視窗歷史記錄發生變化時,onpopstate 事件被觸發。 你可以像這樣新增它 −
示例
<!DOCTYPE html> <html> <body onpopstate = "onpopstateFunction()"> <p>This is demo text</p> </body> </html>
廣告
當視窗歷史記錄發生變化時,onpopstate 事件被觸發。 你可以像這樣新增它 −
<!DOCTYPE html> <html> <body onpopstate = "onpopstateFunction()"> <p>This is demo text</p> </body> </html>