Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我直接从 url 打印
if(isset($_GET['name']){ echo $_GET['name']) }
但是我的朋友告诉我,它现在很糟糕并且容易受到 XSS 的攻击,现在它有多糟糕,我应该怎么做才能防止 XSS?
只需在 htmlspecialchars 中包装不应包含标签的内容
echo htmlspecialchars($_GET["name"]);
我正在尝试使用 jquery 来检测特定表(即“grid1”)中的复选框更改。
(FWIW - 该表是一个 jqgrid)
但是,我使用的“选择器”语句似乎没有按我预期的方式工作。
它不是检测特定表格(即“grid1”)中的复选框更改,而是检测/响应整个文档中的更改 - 包括“grid2”。
我的选