Post
#1
|
|
|
Grupa: Zarejestrowani Postów: 1 045 Pomógł: 5 Dołączył: 8.11.2004 Skąd: trójmiasto Ostrzeżenie: (0%)
|
Witam mam skrypt o adresie
www.stronka.pl/index.php?parametr1=wartosc1¶metr2=wartosc2 i teraz nie wiem jak pobrać wartość parametru, w php bym miał po prostu
a w JavaScript (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) Ten post edytował php programmer 22.08.2006, 09:50:27 |
|
|
|
![]() |
Post
#2
|
|
|
Grupa: Moderatorzy Postów: 36 561 Pomógł: 6315 Dołączył: 27.12.2004 |
Ale tu nie trzeba znac js, tylko google (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
http://www.google.com/search?hl=pl&cli...=Szukaj&lr= http://www.11tmr.com/11tmr.nsf/d6plinks/MWHE-695L9Z I mamy bardzo ciekawa funkcje: Kod function getURLParam(strParamName){
var strReturn = ""; var strHref = window.location.href; if ( strHref.indexOf("?") > -1 ){ var strQueryString = strHref.substr(strHref.indexOf("?")).toLowerCase(); var aQueryString = strQueryString.split("&"); for ( var iParam = 0; iParam < aQueryString.length; iParam++ ){ if ( aQueryString[iParam].indexOf(strParamName + "=") > -1 ){ var aParam = aQueryString[iParam].split("="); strReturn = aParam[1]; break; } } } return strReturn; } |
|
|
|
php programmer zmienna GET w JavaScript 22.08.2006, 09:49:48
revyag http://www.dynamicdrive.com/forums/showthread.php?... 22.08.2006, 09:56:51
php programmer THX revyag. JavaScript chyba nie ma przed toba taj... 22.08.2006, 10:00:04
php programmer Dzięki,
no właśnie w google szukałem
"get Ja... 22.08.2006, 10:03:22 ![]() ![]() |
|
Aktualny czas: 29.12.2025 - 23:36 |