我在使用 onClick(); 绑定到 javascript 函数的按钮时遇到问题;我的界面可以禁止游戏服务器上的人,但现在如果我在这里选择任何人:出于某种原因,它总是会选择 wartog。在我的代码中,一切看起来都重定向到正确的人。<script type="text/javascript"> var link="scripts/playerManager/ban.php?player=IIPoliII&serverpath=server/x1&user=Poli";function editLinkIIPoliII() { var x = prompt("Reason:", ""); if (x === "" || x === null) { alert("You entred no reason please retry to ban this player with a reason"); } else { link+="&reason=" +x; window.location=link; }}</script><a onclick="editLinkIIPoliII()" href="#">Ban</a></td>在这里,您可以看到 IIPoliII 的链接,它看起来不错,如果我使用检查工具,它也会点击正确的位置。我清除了缓存并在 Internet Explorer 中也尝试过,可悲的是,到处都是一样的......为什么会误解链接?
- 1 回答
- 0 关注
- 130 浏览
添加回答
举报
0/150
提交
取消