How can the url expression not be empty and determine whether the url complies with the rules? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:25:01
Original
1785 people have browsed it

The following code can only determine whether the URL complies with the rules, but cannot determine whether it is empty. .
How to write it so that it can be judged that it cannot be empty and comply with the url rules.

	Url : /^http:\/\/[A-Za-z0-9]+\.[A-Za-z0-9]+[\/=\?%\-&_~`@[\]\':+!]*([^<>\"\"])*$/,
Copy after login


Reply to discussion (solution)

var v=/\s/;alert(v.test("  "));alert(v.test("sdsd"));
Copy after login

source:php.cn
Previous article:How to make the block on the right scroll as the web page is scrolled down. _html/css_WEB-ITnose Next article:Regarding how to prevent