自己写的一个JS组件,JCombo 0.9 欢迎测试.也欢迎大家一起开发,想加入的发邮件给我.
SVN的地址是:
http://svn.chinasvn.com:82/jselect

帐号密码到时候我发邮件给你们
/Files/eicesoft/JCombo.zip

测试页代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    
<head>
        
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
        
<title>测试</title>
        
<link href="Combo.css" rel="Stylesheet" />
        
<script language="JavaScript" src="Combo.js">
        
</script>
    
</head>
    
<body>

        
<script language=JavaScript>
            
var co = new Combo("cbo1","项目:"); 
            co.addItem(
"第一个测试项目","1","images/xpFolder.gif");
            co.addItem(
"第二个测试项目","2","images/xpFolder.gif");
            co.addItem(
"第三个测试项目","3","images/xpFolder.gif");
            co.addItem(
"第四个测试项目","4","images/xpFolder.gif");
            co.Init();
        
</script>
        
<br />
        
<script language=JavaScript>
            
var co2 = new Combo("cbo2","项目2:"); 
            co2.addItem(
"第一个测试项目","1","");
            co2.addItem(
"第二个测试项目","2","");
            co2.addItem(
"第三个测试项目","3","");
            co2.addItem(
"第4个测试项目","4","");
            co2.Init();
        
</script>
        
<input type="button" value="项目选择项值" onclick="javascript:alert(co.value);" /><br />
        
<input type="button" value="项目选择项值" onclick="javascript:alert($('cbo1').value);" /><br />
    
</body>
</html>


posted on 2007-09-18 15:44  雨中流泪  阅读(1116)  评论(5编辑  收藏  举报
友情链接:
http://www.52cookbook.com ---你的美食天地