使用 data-* 属性来嵌入自定义数据: 可以用来传参
代码语言:javascript复制<td><input data-schoolcode="${item.schoolCode}" data-region="${item.region}" type="button" class="searchbtns search" value="导出号码" onclick="orderExport(this)"></td>
function orderExport(obj){
var schoolCode = $(obj).data("schoolcode");
var region = $(obj).data("region");
window.location.href = "${ctx}/act/campusNumberManage/outCampusNumber?schoolCode=" schoolCode "®ion=" region;
}
参考: http://www.w3school.com.cn/tags/att_global_data.asp