springMVC中的form:标签使用
2021-07-16 16:06
标签:bre value getc head checkbox var reac style label (1)modelAttribute的值是用于提交到后台的实体类对象名称 (2)form:select path的值要对应实体类的属性值
title="机构" url="/sys/office/treeData?" cssClass=" required span4Tree" dataMsgRequired="必填信息" allowClear="true"/>
value="2017-06-28"
onclick="WdatePicker({dateFmt:‘yyyy-MM-dd‘});"/>
(3)全选全不选和获取全选的值
//全选/反选
function selectAll(){
var checkboxs = document.getElementsByName("checkbox");
var checkall = document.getElementById("checkAll");
if(checkall.checked){
for(var i =0;i
checkboxs[i].checked = true;
}
}else{
for(var j =0;j
checkboxs[j].checked = false;
}
}
}
//获取选中的checkbox的值
function getCheckedValue(checkName) {
var str = "";
if (checkName) {
$("input:checkbox[name=‘" + checkName +"‘]:checked").each(function() {
if ($(this).attr("checked")) {
if (str == "") {
str += $(this).val();
} else {
str += "," + $(this).val();
}
}
});
} else {
$("input[name=type]:checkbox").each(function() {
if ($(this).attr("checked")) {
if (str == "") {
str += $(this).val();
} else {
str += "," + $(this).val();
}
}
});
}
return str;
}
table id="contentTable" > thead> tr> th>input type="checkbox" id="checkAll"onclick="selectAll()"> th>计划名称th> th>模板名称th> th>版本th> th>执行类型th> th>频度th>
tr> thead> tbody>
c:forEach items="${page.list}" var="reportplan"> tr class="even"> td>input type="checkbox" name="checkbox"value="${reportplan.planId}"> |
|
springMVC中的form:标签使用
标签:bre value getc head checkbox var reac style label
原文地址:https://www.cnblogs.com/yehuili/p/9533114.html
上一篇:Spring相关