很多时候onclick事件是伴随着页面的跳转,也就会有相应的参数传递案。案例如下所示:123 #为你要跳转的页面 这个时候你传的参数就是123 function...
function showTable(data){ alert(data.innerHTML);//js写法 alert($(data).html());//jquery写法 }
function showTable(data){ //type 是你传的参数,所以这里你要进行获取 var type = data.type; alert(type); }