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

📄 listmenu.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?
include_once 'inc/auth.php';
$ITEM_MAX = 100;
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;
}
var parent_window = parent.dialogArguments;
var option_str="";
for(i=1;i<=';
echo $ITEM_MAX;
echo ';i++)
{
		var item_str="item_"+i;
		if(document.all(item_str).value!="")
			option_str+="<option value=\'"+document.all(item_str).value+"\'>"+document.all(item_str).value+"</option>";
}
control_html="<select title=\\""+ITEM_NAME.value.replace("\\"","&quot;")+"\\" style=\\"font-size:"+ITEM_SIZE.value+"\\">"+option_str+"</select>";
if(edit_flag==1)
{
	oSelection =  parent.dialogArguments.document.selection.createRange();
	oSelection(0).title=ITEM_NAME.value;
	parent_window.doStyle("delete");
	parent_window.insertHtml(control_html);
}
else
	parent_window.EDIT_HTML.insertHtml(control_html);
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_SIZE.value = oSelection(0).style.fontSize.replace("px","");
	for (i=0; i<oSelection(0).options.length; i++)
	{
			var item_str="item_"+(i+1);
			document.all(item_str).value =  oSelection(0).options(i).text;
	}
}
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 colspan="2">控件名称:
		<Input name="ITEM_NAME" type="text" class="SmallInput" size="20">
		<input type="button" onclick="my_submit();" value="确 定" class="SmallButton">
		</td>
</tr>
<tr class="TableContent">
		<td nowrap colspan="2">字体大小:
		 <Input name="ITEM_SIZE" type="text" class="SmallInput" size="20" title="可选,默认13像素">
		</td>
</tr>
<tr class="TableHeader">
		<td nowrap align="center">序号</td>
		<td nowrap align="center" title="Tab键切换输入框">输入下拉菜单项目&nbsp;&nbsp;
		</td>
</tr>
';
for ($I = 1; $I <= $ITEM_MAX; ++$I)
{
	echo '  <tr class="TableContent">
		<td nowrap align="center">';
	echo $I;
	echo '</td>
		<td nowrap align="center" title="Tab键切换输入框"><Input name="item_';
	echo $I;
	echo '" type="text" class="SmallInput" size="30"></td>
</tr>
';
}
echo '</table>
</body>
</html>';
?>

⌨️ 快捷键说明

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