前端页面:
<button id="button3" class="normalBut" analystType="flowToAnalyst" onclick="onCheckAnalysis(11,this)">流向分析</button>
JS代码:
function onCheckAnalysis(num, thisClick) { if (num == 1) { } else if (num == 2) { } $(thisClick).addClass('selectBut'); }