는 document.URL가 curreny의 URL 올바른 URL을 표시되지 왜 나에게 을 알려주십시오 캠 : http://jsfiddle.net/PWEAR/20/ 개 표시 : 여기document.URL이 curreny URL을 표시하지 않는 이유는 무엇입니까?
http://fiddle.jshell.net/_display/ 내 바이올린입니다 : http://jsfiddle.net/PWEAR/20/
console.log(document.URL + ': ' + CheckUrl(document.URL));
alert("http://ca.firstrail.com: " + CheckUrl("http://ca.firstrail.com"));
alert("http://fr.firstrail.com: " + CheckUrl("http://fr.firstrail.com"));
function CheckUrl(url) {
var rx = new RegExp('http://(ca|fr)');
var result = rx.exec(url);
return result && result[1] || 'no fr or ca';
}
_ 올바른 URL _......이 의미는 무엇입니까? 저에게 잘 작동합니다. – Jai
저에게 잘 작동합니다. – ReeCube
어떤 브라우저와 버전을 사용하고 있습니까? 이로 인해 문제가 발생할 수 있습니다. – ReeCube