87,997
社区成员




<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Tabs Tools - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
<link rel="stylesheet" type="text/css" href="../demo.css">
<script type="text/javascript" src="../../jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
<script language="javascript">
<!--
function checkinfo(){
//如何或者控件value?
//如何判断每个tab是否控件之间的value是否重复?
//如何取到值提交到后台?
}
-->
</script>
</head>
<body onload="add()">
<form name="form" method="post" action="/zygl/action/PBranchPlan.asp" onsubmit="return checkinfo();">
<h2>Tabs Tools</h2>
<div class="demo-info">
<div class="demo-tip icon-tip"></div>
<div>Click the buttons on the top right of tabs header to add or remove tab panel.</div>
</div>
<div style="margin:10px 0;"></div>
<div id="tt" class="easyui-tabs" data-options="tools:'#tab-tools'" style="width:700px;height:250px">
</div>
<div id="tab-tools">
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-add'" onclick="add()"></a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-remove'" onclick="remove()"></a>
</div>
<script type="text/javascript">
var index = 0;
function add(){
index++;
if(index==1){
$('#tt').tabs('add',{
title: 'Tab'+index,
content: '<div style="padding:10px">推广日期'+index+':<input type="text" name="LaunchDate"'+index +'><br><input type="checkbox" name="LaunchBranch"'+index +' value="上海">上海<input type="checkbox" name="LaunchBranch"'+index +' value="北京">北京</div>',
closable: false
});
}
else{
$('#tt').tabs('add',{
title: 'Tab'+index,
content: '<div style="padding:10px">推广日期'+index+':<input type="text" name="LaunchDate"'+index +'><br><input type="checkbox" name="LaunchBranch"'+index +' value="上海">上海<input type="checkbox" name="LaunchBranch"'+index +' value="北京">北京</div>',
closable: true
});
}
}
function remove(){
var tab = $('#tt').tabs('getSelected');
if (tab){
var index = $('#tt').tabs('getTabIndex', tab);
if(index!=0){
$('#tt').tabs('close', index);
}
}
}
</script>
<input type="Submit" name="Submit" value="提交" accesskey="S">
</form>
</body>
</html>
if($('div:eq(0) :checked[value='+SHA+']').length>0||$('div:eq(2) :checked[value='+SHA+']').length>0)
{
//SHA已经被选择了连续多月推广
//SHA对应的checkbox取消选中
}
var obj = $("#tt div");
for (var i = 0; i < obj.length; i++) {
var date = $(obj[i]).children("input").eq(0);//获取第一个input
}