📄 checkbox.php
字号:
<?
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>选择框设定</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
function my_submit()
{
if(ITEM_NAME.value=="")
{
alert("控件名称不能为空");
return;
}
if(edit_flag==0)
{
var parent_window = parent.dialogArguments;
var control_html="<input type=checkbox title=\\""+ITEM_NAME.value.replace("\\"",""")+"\\" "+ITEM_VALUE.value+">";
parent_window.EDIT_HTML.insertHtml(control_html);
}
else
{
oSelection = dialogArguments.document.selection.createRange();
sRangeType = dialogArguments.document.selection.type;
if (sRangeType == "Control")
{
oSelection(0).title = ITEM_NAME.value;
oSelection(0).checked = ITEM_VALUE.value;
}
}
window.close();
}
//-- 获取控件属性 --
var edit_flag=0;
function LoadDo()
{
oSelection = dialogArguments.document.selection.createRange();
sRangeType = dialogArguments.document.selection.type;
if (sRangeType == "Control")
{
edit_flag=1;
ITEM_NAME.value = oSelection(0).title;
ITEM_VALUE.selectedIndex = oSelection(0).checked;
}
ITEM_NAME.focus();
}
</script>
</head>
<body topmargin="0" onload="LoadDo();">
<table border="0" cellspacing="1" width="100%" class="small" bgcolor="#000000" cellpadding="3" align="center">
<tr class="TableContent">
<td nowrap>控件名称:
</td>
<td nowrap>
<Input name="ITEM_NAME" type="text" class="SmallInput" size="20">
</td>
</tr>
<tr class="TableContent">
<td nowrap>默认值:
</td>
<td nowrap>
<select class="SmallSelect" name="ITEM_VALUE">
<option value="">不选中
<option value="checked">选中
</select>
</td>
</tr>
<tr>
<td class="TableControl" colspan="2" align="center">
<input type="submit" onclick="my_submit();" value="确 定" class="SmallButton">
</td>
</tr>
</table>
</body>
</html>
';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -