매개 변수 나는 다음과 같은 URL는
http://somesite/somepage.aspx
이 같은 쿼리 매개 변수를 다른 URL이있는 쿼리 매개 변수 값을 전달을했습니다. http://someothersite/someotherpage.aspx?param1=value&source=http://anotheronesite/anotherpage
http://somesite/somepage.aspx?pageURL= 나는 굵은 글씨로 된 것과 PAGEURL 값을 얻을 필요가있다. 하지만 내가 받고있어
http://someothersite/someotherpage.aspx?param1=value
나는 소스 매개 변수를 얻지 못하고있다. 다음 JavaScript 함수를 사용 중입니다. -
function getParameterByName(name)
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(window.location.href);
if(results == null)
return "";
else
return decodeURIComponent(results[1].replace(/\+/g, " "));
}
아이디어가 있으십니까?
어디에서 이름/URL을 가져 옵니까? –
코드 뒤에 - C#을 설정했습니다. – NLV
모든 URL을 원합니다. 그것은 변하지 않을 것입니다. 내가 할 수 있을까? pageURL을 매개 변수로 사용하는 특정 함수가 좋습니다. – NLV