0
<input type="file" id="css-file" />
<input type="text" id="css-url" value="eg. http://domain.com/style.css" />
我需要这两个字段只接受.css文件。我可以验证而不必为这两个字段使用验证插件吗?Validate Extension(jQuery)
如果检测到比的.css其他任何东西,它应该给一个警告()
谢谢!
嗯...可以使用onChange代替吗? – 3zzy 2010-09-18 11:54:40
@Nimbuz - 绝对如此:http://jsfiddle.net/nick_craver/RVKPg/1/ – 2010-09-18 11:58:36
太棒了,但它仍然接受警报后的输入? – 3zzy 2010-09-18 12:04:22