select/option
共 4 篇文章
用javascript动态整体替换修改下拉列表option的内容
aa bb 以上已经在IE测试通过 原来select内容是aa,bb,点按钮后内容变成saj,abc document.createDocumentFragment 添加节点的时候使用 对于少量的更新,可以不使用 然而,当要添加大量数据时,如果逐个添加这些节点,这个过程有可能会十分缓慢。为解决这个问题,可以创建一个文档碎片,把所有的新节点附加其上,然后把文档碎片的内容一次性添加到document中。 假设你想创建十个新段落。你可能这样写 New Document 这段代码运行良好,但问题是它调用了十次document.body.appendChild(),每次要产生一次页面刷新。这时,文档碎…
2008-12-03 11:15 · select/option · HTML · JavaScript · IE
option操作小结
1在select列表第一行增加一个option的方法 方法1.document.getElementById("sel").add(new Option("1","1"),0); 方法2var y=document.createElement('option'); y.text='2'; y.value='2'; document.getElementById("sel").add(y,0); //0为索引号 2在select列表第一行修改一个option的方法,注意是覆盖 document.getElementById('selectId').options[0] = new Option…
2008-12-01 17:30 · select/option
IE的option的title属性无法显示的替代做法
<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %> <% String path = request.getContextPath(); String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; %> My JSP 'index.jsp' starting page 1
2008-11-28 14:28 · select/option · HTML · JSP · IE
动态生成option下拉列表
2008-11-26 12:07 · select/option · json