测试修改项目的时候js突然失效,方法能进去但是不会执行方法内的jQuery代码
最开始是使用的<table></table>,后来换成的<div>,如下
<div>
<ul>
<li id="first" style="width:10%"><input style="color: blue;" type ="button" name="" οnclick="decideWin1('${var.BATTLE_ID}');" value="甲方胜"/></li>
<li id="second" style="width:10%;"><input style="color:green;" type ="button" name="" οnclick="decideWin2('${var.BATTLE_ID}');" value="乙方胜"/></li>
<li id="third" style="width:10%;"><input style="color:red;" type ="button" name="" οnclick="decideWin3('${var.BATTLE_ID}');" value="双方均未到场"/></li>
</ul>
</div>
后来换成下面的<a>标签就可以了
<div>
<a id="first" style="width:10%"><input style="color: blue;" type ="button" name="" οnclick="decideWin1('${var.BATTLE_ID}');" value="甲方胜"/></a>
<a id="second" style="width:10%;"><input style="color:green;" type ="button" name="" οnclick="decideWin2('${var.BATTLE_ID}');" value="乙方胜"/></a>
<a id="third" style="width:10%;"><input style="color:red;" type ="button" name="" οnclick="decideWin3('${var.BATTLE_ID}');" value="双方均未到场"/></a>
</div>
还有就是注意js的引用顺序,顺序颠倒也会造成js失效。