javascript
ligeqiang
这个作者很懒,什么都没留下…
展开
-
javascript select 获取 text 的值
<html> <body> <form> <select name="cars" onchange="alert(this.options[this.selectedIndex].text)"> <option value="volvo">Volvo</option&am原创 2011-09-01 11:18:15 · 64 阅读 · 0 评论 -
判断输入类型
//判断输入是否是数字 function cube(x) { if (typeof(x) != 'number') return 0; return x * x * x; } // Once you uncomment the type check in line 2, the // cube function should return 0. cube("tes...原创 2011-12-29 16:30:37 · 94 阅读 · 0 评论