摘要:
function parseUrl(url) { var parse_url = /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/; var result = parse_url.exec(url); var names = ['url', 'scheme', 'slash', 'host', 'port', 'path', 'query' 阅读全文
摘要:
regexp.exechttp://www.w3school.com.cn/js/jsref_exec_regexp.aspregexp.testhttp://www.w3school.com.cn/js/jsref_test_regexp.aspstring.matchhttp://www.w3school.com.cn/js/jsref_match.aspstring.replacehttp://www.w3school.com.cn/js/jsref_replace.aspstring.searchhttp://www.w3school.com.cn/js/jsref_search.as 阅读全文