Javascript 常用的一些功能
2015-01-05 16:41
281 查看
String.prototype.trim = function () { return this.replace(/(^\s*)|(\s*$)/g, ""); }
使用方法 string.trim();
关于 Select 标签,获取选中的值/文本
var test = document.GetElementById("test"); var test_value = test.options[test.options.selectedIndex].value; var test_txt = test.options[test.options.selectedIndex].text; alert(test_value);
相关文章推荐
- javascript的一些常用功能函数
- javascript中常用的一些功能及正则表达式的用法
- Asp.net常用的一些功能
- 一些javascript實用小功能
- 工作中常用的一些javascript的小技巧
- 常用的一些javascript小技巧(转)
- Oracle常用的一些功能集锦
- 常用的一些javascript小技巧(收藏http://www.car371.com/article.asp?id=13)
- javascript常用功能
- 用perl写的一些常用功能函数
- 一些常用的JavaScript正则表达式
- 常用的一些javascript小技巧 很实用
- 自己常用的一些javascript代码
- 常用的一些javascript小技巧
- 常用的一些javascript小技巧
- JavaScript常用小技巧—各种屏蔽功能
- [导入][收藏]常用的一些javascript小技巧
- javascript常用到的一些方法
- 常用的一些javascript小技巧[收藏]
- javascript常用的一些判断输入验证