就是用户输入值后..我要判断他填写的前7个字符是不是 http:// 怎么写啊
------解决方案--------------------
用正则。。。
------解决方案--------------------
试试。
- JScript code
var aa='http://weibo.com'; if(aa.substr(0,7)=='http://') alert(true); else alert(false);
var aa='http://weibo.com'; if(aa.substr(0,7)=='http://') alert(true); else alert(false);