首页 技术教程 实用代码 注册破解 正则表达式 网址导航 电子书籍

Javascript操作select控件大全

1判断select选项中 是否存在Value="paraValue"的Item 2向select选项中 加入一个Item 3从select选项中 删除一个Item 4删除select中选中的项 5修改select选项中 value="paraValue"的text为"paraText" 6设置select中text="paraText"的第一个Item为选中 7设置select中value="paraValue"的Item为选中 8得到select的当前选中项的value 9得到select的当前选中项的text 10得到select的当前选中项的Index 11清空select的项 js 代码// 1.判断select选项中 是否存在Value="paraValue"的Item function jsSelectIsExitItem(objSelect, objItemValue) { var isExit = fals...
类别:网页编程 - JavaScript    查看:111    更新:2014-04-22

国外的页面JavaScript文件优化

外部JavaScript文件块下载和伤害你的页面的性能,但有一个简单的方法来解决此问题:并行使用动态脚本标记和加载脚本,提高页面加载速度和用户体验。 --The problem: scripts block downloadsLet's first take a look at what the problem is with the script downloads. The thing is that before fully downloading and parsing a script, the browser can't tell what's in it. It may contain document.write() calls which modify the DOM tree or it may even contain location.href and send the user to a whole new page. If that happens, any components downloaded from the previous page may never be needed. In order ...
类别:网页编程 - JavaScript    查看:100    更新:2014-04-22