<html> <head> <script language="javascript"> var infoMap = new Object() ; function number(){ var obj = document.getElementById("mySelect"); //obj.options[obj.selectedIndex] = new Option("我的吃吃","4"); //在当前选中的那个的值中改变 //obj.options.style.cssText =("background:red"); obj.options.add(new Option("我的吃吃","4"));//再添加一个option //alert(obj.length); obj.options[obj.length-1].style.cssText =("background:#66FF33"); /* for (var i = 0; i < obj.length; i++) { obj.options.add(new Option(obj[i], obj[i])); } */ //alert(obj.selectedIndex);//显示序号,option自己设置的 /* var name = obj.options[obj.selectedIndex].text; infoMap[name+'-1'] = { name : name, age : '1' }; if( infoMap[name+'-1'] ) { var oldname = infoMap[name+'-1'].name; infoMap[name+'-1'].name = oldname+','+name; } alert(infoMap[name+'-1'].age); */ //obj.options[obj.selectedIndex].text = "我的吃吃";更改值 //obj.remove(obj.selectedIndex);//删除功能 } </script> </head> <body> <select multiple> <option title='hello' selected>我的包包</option> <option value="#333333">我的本本</option> <option>我的油油</option> <option>我的担子</option> </select> </p> <p>Test for set style.</p> <p><button"document.getElementsByTagName('p')[0].style='color:#000;background:#eee;'">set style(op only)</button></p> <p><button"document.getElementsByTagName('p')[0].style.cssText='background:red;'">set style(ff & ie)</button></p> <p><button"document.getElementsByTagName('p')[0].setAttribute('style','color:#000;background:#eee;')">set style(ff & op)</button></p> <p><button"document.getElementsByTagName('p')[0].getAttribute('style').setAttribute('cssText','color:#000;background:#eee;')">set style(ie only)</button></p> <p> <input type="button" name="button" value="查看结果"> </body> </html>
Smilar Posts of option to operate in js
-
hibernate using c3p0 connection pooling
Private http://www.lifevv.com/tenyo/doc/20070605102040991.html c3p0 for open source's JDBC connection pool, with the release hibernate. This article describes how to use the hibernate configuratio ...
-
Hibernate configuration parameters hibernate.hbm2ddl.auto
Hibernate in the configuration file: Parameter Description: validate load hibernate, the authentication to create a database table structure create each load hibern ...
-
Build flex + spring + blazeds + hibernate application
Build flex + spring + blazeds + hibernate application First, set up the project blazeds 1, will blazeds.war extract to a directory, such as: myflex /; 2, set up java works were such as: MyFlex, in the ...
-
Hibernate connection pool configuration
Hibernate connection pool configuration oracle.jdbc.driver.OracleDriver jdbc: oracle: thin: @ 10.203.14.132:1521: remotedb
-
hibernate generic generic DAO
hibernate generic generic DAO
-
can not be represented as java.sql.Timestamp
Development of procedures for the use of hibernate when, some time there is no need to fill in the fields, but after the hibernate query time reported "Java.sql.SQLException: Value'0000-00-00 ' ...
-
Struts2 + hibernate + spring problem user log in
dao layer services layer action jsp user name: Password:
-
Hibernate secondary cache
Hibernate cache: 2-bit cache, also known as process-level cache or SessionFactory level cache, secondary cache can be shared by all of the session Cache configuration and the use of: Will echcache.xml ...
-
Hibernate's lazy strategy
hibernate Lazy strategy can be used in: tag, it can be true / false Tags can values true / false type of necessary tools to enhance can tag values true / false / extra can be single-ended cor ...







