⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tablecellsplit.vm

📁 一个webwork+spring+ibatis的小例子
💻 VM
字号:
<html>
<head>
<LINK type="text/css" rel="stylesheet" href="${action.getText('config.webeditor.path.css')}/dialog.css">
<script language="JavaScript">
	#parse("${action.getText('config.webeditor.path.js')}/dialog.js.vm")
</script>

<script language="JavaScript">

document.write("<title>$action.getText('webeditor.dialog.table.cellsplit.title')</title>");

// 判断值是否大于0
function MoreThanOne(obj, sErr){
	var b=false;
	if (obj.value!=""){
		obj.value=parseFloat(obj.value);
		if (obj.value!="0"){
			b=true;
		}
	}
	if (b==false){
		BaseAlert(obj,sErr);
		return false;
	}
	return true;
}

// 预览
function doView(opt){
	if (opt=="col"){
		d_col.checked=true;
		d_row.checked=false;
	}else{
		d_col.checked=false;
		d_row.checked=true;
	}
	if (d_col.checked){
		d_view.innerHTML = "<table border=1 cellpadding=0><tr><td width=25>&nbsp;</td><td width=25>&nbsp;</td></tr></table>";
		d_label.innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;$action.getText('webeditor.dialog.table.cellsplit.rows')";
	}
	if (d_row.checked){
		d_view.innerHTML = "<table border=1 cellpadding=0 width=50><tr><td>&nbsp;</td></tr><tr><td>&nbsp;</td></tr></table>";
		d_label.innerHTML = "&nbsp;&nbsp;&nbsp;&nbsp;$action.getText('webeditor.dialog.table.cellsplit.cols')";
	}
}

</script>

<SCRIPT event=onclick for=Ok language=JavaScript>
	// 行列数的有效性
	if (!MoreThanOne(d_num,"$action.getText('webeditor.dialog.table.cellsplit.errorInfo1')")) return;

	if (d_row.checked){
		dialogArguments.TableRowSplit(parseInt(d_num.value));
	}
	if (d_col.checked){
		dialogArguments.TableColSplit(parseInt(d_num.value));
	}

	window.returnValue = null;
	window.close();
</SCRIPT>

</head>
<body bgcolor=menu>

<table border=0 cellpadding=0 cellspacing=0 align=center>
<tr>
	<td>
	<table border=0 cellpadding=0 cellspacing=0>
	<tr><td colspan=3 height=5></td></tr>
	<tr><td><input type=radio id=d_col checked onclick="doView('col')"><label for="d_col">$action.getText('webeditor.dialog.table.cellsplit.toRows')</label></td><td rowspan=3 width=30></td><td width=60 rowspan=3 id=d_view valign=middle align=center></td></tr>
	<tr><td height=5></td></tr>
	<tr><td><input type=radio id=d_row onclick="doView('row')"><label for="d_row">$action.getText('webeditor.dialog.table.cellsplit.toCols')</label></td></tr>
	<tr><td height=5 colspan=3></td></tr>
	<tr>
		<td id=d_label></td>
		<td></td>

		<td><input type=text id=d_num size=8 value="1" ONKEYPRESS="event.returnValue=IsDigit();" maxlength=3></td>
	</tr>
	</table>
</tr>
<tr><td height=5></td></tr>
<tr><td align=right><input type=submit value="$action.getText('webeditor.dialog.ok')" id=Ok>&nbsp;&nbsp;<input type=button value="$action.getText('webeditor.dialog.cancel')" onclick="window.close();"></td></tr>
</table>

<Script Language=JavaScript>
doView('col');
</Script>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -