2005/08/14 | 模态网页窗体
类别(网页类学习笔记) | 评论(0) | 阅读(222) | 发表于 23:59
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<form name="form1" method="post" action="">
<textarea name="GWID2" cols="50" rows="5" wrap="VIRTUAL" id="GWID22"></textarea>
<input name="button" type="button" onClick="window.showModelessDialog('Select_user.asp',window,'dialogHeight:350px;dialogWidth:500px;dialogleft:200px;dialogtop:100px;help:no;status:no;scroll:no');" value="选择">
</form>
</body>
</html>
// 调用网页


<html>
<head>
<title>选择岗位</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="wed, 26 Feb 1997 08:21:57 GMT">
</head>
<body bgcolor="menu" text="#000000" style="border:none">
<form action="untitled2.asp" method="get" enctype="multipart/form-data" name="form1">
<table align="center" cellpadding="10">
<tr>
<td valign="middle" align="center">
<table align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td height="24" align="center"><font color="#FF0000">待选择对象</font></td>
<td width="15" align="center" valign="middle">&nbsp;</td>
<td align="center"><font color="#0000FF">已选择对象</font></td>
</tr>
<tr>
<td>
<select name="strUsername" size="15" multiple onDblClick="moveSelectedOptions(document.form1.strUsername, document.form1.strAdminister, false, '')" style="width:210">

<option value="DW-MX ASP">DW-MX ASP</option>

<option value="DW-MX 数据库相关">DW-MX 数据库相关</option>

<option value="Flash+数据库协作开发">Flash+数据库协作开发</option>

<option value="WEB应用平台搭建">WEB应用平台搭建</option>

<option value="WEB人才交流与项目合作">WEB人才交流与项目合作</option>

<option value="回收站">回收站</option>

<option value="DW-MX 站务栏目">DW-MX 站务栏目</option>

<option value="论坛通告">论坛通告</option>

<option value="论坛灌水区">论坛灌水区</option>

<option value="TEMP 预留栏目">TEMP 预留栏目</option>

<option value="网友协作">网友协作</option>

<option value="网页美工与色彩">网页美工与色彩</option>

<option value="考试系统开发">考试系统开发</option>

<option value="UD & MX 作品展示">UD & MX 作品展示</option>

<option value="网站制作技巧">网站制作技巧</option>

<option value="插件相关讨论">插件相关讨论</option>

<option value="MX 资源相关讨论">MX 资源相关讨论</option>

<option value="DW-MX CFML">DW-MX CFML</option>

<option value="DW-MX PHP">DW-MX PHP</option>

<option value="DW-MX JSP">DW-MX JSP</option>

<option value="微软.NET开发专栏">微软.NET开发专栏</option>

<option value="公共 FTP 空间">公共 FTP 空间</option>

<option value="软件 FTP 空间">软件 FTP 空间</option>

<option value="影音 FTP 空间">影音 FTP 空间</option>

</select>
</td>
<td width="40" align="center" valign="middle"> <button onclick="moveAllOptions(document.form1.strUsername, document.form1.strAdminister, false, '')"><font face="webdings">8</font></button><br>
<button onclick="moveSelectedOptions(document.form1.strUsername, document.form1.strAdminister, false, '')"><font face="webdings">4</font></button> <br>
<button onclick="moveSelectedOptions(document.form1.strAdminister, document.form1.strUsername, false, '')"><font face="webdings">3</font></button><br>
<button onclick="moveAllOptions(document.form1.strAdminister, document.form1.strUsername, false, '')"><font face="webdings">7</font></button>
</td>
<td>
<select name="strAdminister" size="15" multiple onDblClick="moveSelectedOptions(document.form1.strAdminister, document.form1.strUsername, false, '')" style="width:210">
</select>
</td>
</tr>
<tr>
<td height="30" align="center" colspan="3"><hr>
<input type="button" name="S1" value=" 确定 " style="width:80" onClick="selectAllOptions(document.form1.strAdminister,1);" >
<input type="button" name="S2" value=" 取消 " onclick="window.close();" style="width:80">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
<script>
function selectAllOptions(obj,w) {
var iMax = 1000;
var iMaxCounter = obj.options.length;
if (iMaxCounter > iMax) {
iMaxCounter = iMax;
}
if (w==1){
var uText="";
var uvalue="";
for (var i=0; i<iMaxCounter; i++) {
//obj.options[i].selected = true;
uText= uText + obj.options[i].text + "&nbsp;&nbsp;";
uvalue=uvalue + obj.options[i].value + ",";
}
//document.apply.submit
window.dialogArguments.form1.GWID2.value=uvalue;
//window.dialogArguments.<!--Net-OA6-->.innerHTML=uText;
//window.dialogArguments.<!--Net-OA7-->.className='';
window.close();
}else{
for (var i=0; i<iMaxCounter; i++) {
obj.options[i].selected = true;
}
}
}
function moveSelectedOptions(from,to) {
if (arguments.length>3) {
var regex = arguments[3];
if (regex != "") {
unSelectMatchingOptions(from,regex);
}
}
for (var i=0; i<from.options.length; i++) {
var o = from.options[i];
if (o.selected) {
to.options[to.options.length] = new Option( o.text, o.value, false, false);
}
}
for (var i=(from.options.length-1); i>=0; i--) {
var o = from.options[i];
if (o.selected) {
from.options[i] = null;
}
}
if ((arguments.length<3) || (arguments[2]==true)) {
sortSelect(from);
sortSelect(to);
}
from.selectedIndex = -1;
to.selectedIndex = -1;
}
function moveAllOptions(from,to) {
selectAllOptions(from,0);
if (arguments.length==2) {
moveSelectedOptions(from,to);
}
else if (arguments.length==3) {
moveSelectedOptions(from,to,arguments[2]);
}
else if (arguments.length==4) {
moveSelectedOptions(from,to,arguments[2],arguments[3]);
}
}
</script>
</body>
</html>
// 模态调用网页

0

评论Comments