使用HTML中的onstorage属性在Web Storage区域更新上执行。您可以尝试运行以下代码以实现onstorage属性-
<!doctype html>
<html>
<head><title>HTML onstorage</title>
</head>
<body>
<h2>Welcome</h2>
<body onstorage = "javascript:alert('Your learning journey!');">
Demo text</body>
</body>
</html>