摘要:index.html <!DOCTYPE html> <html> <head> <!-- 定义网页编码格式 --> <meta charset="UTF-8" /> </head> <body> <script> alert("右究"); </script> </body> </html>
阅读全文
摘要:index.html <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <script> document.addEventListener("DOMContentLoaded", function () { console.log(doc
阅读全文
摘要:方法1:给 a 标签添加 rel 属性 <a href="https://an.evil.site" target="_blank" rel="noopener">恶意网站</a> 方法2:打开子窗口时将子窗口的 opener 设置为 null const newWin = window.open(
阅读全文
摘要:index.html <sript src="//example.js"></sript>
阅读全文
摘要:index.html <!-- integrity 属性为该外部脚本写入哈希签名,用于验证脚本一致性 --> <script src="./xxx.js" integrity="****"></script>
阅读全文
摘要:index.html <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> </head> <body> <button onclick="clickHandler()">print</button> <script> function cli
阅读全文
摘要:index.html <a href="javascript:void(0)" onclick="alert('右究')">点击</a>
阅读全文
摘要:1. HTML 4.01 Strict 2. HTML 4.01 Transitional 3. HTML 4.01 Frameset 4. HTML 5
阅读全文
摘要:1. 在这个问题上, 不同浏览器的设置方法有所差异, 可以写成下面这种形式. 详情见: https://stackoverflow.com/questions/2610497/change-an-html5-inputs-placeholder-color-with-css
阅读全文