http://webfx.eae.net/dhtml/combobox/combobox.htm
解决方案 »
- ExtJs的问题:Ext.ux.form.SpinnerField右端的小图标不能正常显示!
- 请问这个函数该怎么理解
- 如何实现禁止全部点击操作的效果
- 如何遍历一个文件夹下的所有文件与目录
- 如何跨域获取变量或调用函数?
- 网站初次登录的指引步骤,点击任何任何区域都会显示下一步如何实现
- 怎样在所有的浏览器都屏蔽菜单栏、工具栏、地址栏和状态栏
- 框架!上下两个,怎么在一个框架控制另一个框架的前进后退和刷新!
- 如何用javascripr动态添加table?
- 如何不利用Activex控件直接用JavaScript访问修改注册表?
- 小弟在坐tree的时候,想通过点继节点打开一个窗口的问题!!再线等待,立刻给分!!
- 还是屏蔽后退按钮的问题
好东西
function ComboBox()
{
if(arguments.length==0)
{
self.status="ComboBox invalid - no name arg"
} this.name = arguments[0];
this.par = arguments[1]||document.body
this.view = document.createElement("DIV");
this.view.style.position='absolute';
this.options = new Array();
this.expops = new Array();
this.value = "" this.build = ComboBox_build
this.make = ComboBox_make;
this.choose = ComboBox_choose;
this.add = ComboBox_add;
this.toggle = ComboBox_toggle;
this.update = ComboBox_update;
this.remove = ComboBox_remove; this.make()
this.txtview = this.view.childNodes[0]
this.valcon = this.view.childNodes[1]
if (arguments.length>1)
this.par = eval(this.par);
this.par.appendChild(this.view)
Global_combo_array[Global_combo_array.length]=this;
if(Global_run_event_hook){ComboBox_init()}
}
把原来的combox改成现在这个
页面上这样调用
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td id="td111"><script>dm1=new ComboBox("dm1","td111")dm1.add(
new ComboBoxItem("barge",1),
new ComboBoxItem("benluc",2),
new ComboBoxItem("benlieeeeck",3),
new ComboBoxItem("taco",4)
)
</script></td>
</tr></table>