这是我用 Javascript 制作的“Dual listbox”(双向选择器)的一个应用示例,是从我的代码中抠出来的。在网页编程中经常会用到。 也许我的实现太烦琐了,希望大家有更好的代码贡献出来。 <html> <head> <title>选择器</title> <link href="./style/style.css" rel="stylesheet" type="text/css"> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <meta http-equiv="Page-Enter" content="blendTrans(Duration=1.0)"> <meta http-equiv="Page-Exit" content="blendTrans(Duration=1.0)"> <script language="javascript"> function openwin(url, l, t, w ,h) {open(url,'','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width='+ w +',height='+ h +',left='+ l +',top='+ t);} function check_and_submit(frm) { SelectAll(frm.SelectedItem); frm.submit(); } </script> </head> <body> <form name="frm1" id="frm1" method="post" action="save.asp"> <input name="allowsubmit" type="hidden" value="OK"> <table width="500" border="0" cellspacing="0" cellpadding="0" align="center"> <tr height=10><td colspan=3></td></tr> <tr> <td width="220" align=center valign="top"> 已分配该用户管理的栏目:<br><br>
|