![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 749 Pomógł: 37 Dołączył: 3.10.2006 Ostrzeżenie: (0%) ![]() ![]() |
Czy mozna w js w jakiś sposób wstawic wartość z get?
|
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Zarejestrowani Postów: 4 340 Pomógł: 542 Dołączył: 15.01.2006 Skąd: Olsztyn/Warszawa Ostrzeżenie: (0%) ![]() ![]() |
|
|
|
![]()
Post
#3
|
|
Grupa: Zarejestrowani Postów: 311 Pomógł: 7 Dołączył: 2.08.2006 Skąd: Bystrzyca Kłodzka/Nysa Ostrzeżenie: (10%) ![]() ![]() |
oczywiście że może. Patrz wyżej.
Warn za nabijanie postów. (Sabistik) |
|
|
![]()
Post
#4
|
|
Grupa: Zarejestrowani Postów: 697 Pomógł: 47 Dołączył: 19.12.2003 Skąd: Lublin Ostrzeżenie: (0%) ![]() ![]() |
Wydaje mi się, że autorowi tematu o cos innego chodziło tzn wczytywanie danych z $_GETa ale bez użycia php.
Kiedys cos takiego pisałem. Adres jest przechowywany w zmiennej window.location Wystarczy poczytać troche o funkcji split() i podzelić wg. znaka zapytania i ampersandu... nastpnie wydzielic nazwy parametrow i wartosci. Zrobic z tego tablice globalną i powinno działać (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif) |
|
|
![]()
Post
#5
|
|
Grupa: Zarejestrowani Postów: 1 045 Pomógł: 5 Dołączył: 8.11.2004 Skąd: trójmiasto Ostrzeżenie: (0%) ![]() ![]() |
Mój wujek google mówi, że tak
http://scripts.franciscocharrua.com/javasc...t-variables.php Kod function getVar(name)
{ get_string = document.location.search; return_value = ''; do { //This loop is made to catch all instances of any get variable. name_index = get_string.indexOf(name + '='); if(name_index != -1) { get_string = get_string.substr(name_index + name.length + 1, get_string.length - name_index); end_of_value = get_string.indexOf('&'); if(end_of_value != -1) value = get_string.substr(0, end_of_value); else value = get_string; if(return_value == '' || value == '') return_value += value; else return_value += ', ' + value; } } while(name_index != -1) //Restores all the blank spaces. space = return_value.indexOf('+'); while(space != -1) { return_value = return_value.substr(0, space) + ' ' + return_value.substr(space + 1, return_value.length); space = return_value.indexOf('+'); } return(return_value); } Ten post edytował php programmer 3.09.2007, 13:50:43 |
|
|
![]() ![]() |
![]() |
Aktualny czas: 22.08.2025 - 17:20 |