Fakeheal Super Moderator 5 Март 2011 #1 Здравейте как мога да направя едно най-обикновено селект меню: HTML: <select> <option></option> <option>Google.BG</option> </select> когато кликна на Google.BG да ме редиректва към 'http://google.bg/' например?
Здравейте как мога да направя едно най-обикновено селект меню: HTML: <select> <option></option> <option>Google.BG</option> </select> когато кликна на Google.BG да ме редиректва към 'http://google.bg/' например?
T tedo96 Registered 5 Март 2011 #2 http://stackoverflow.com/questions/580281/redirect-automatically-when-selecting-an-item-from-a-select-drop-down-list http://www.sitepoint.com/forums/javascript-15/javascript-redirect-select-558774.html http://bytes.com/topic/javascript/answers/148524-redirect-url-using-javascript-drop-down-list http://www.ozzu.com/programming-forum/javascript-redirect-statemet-t96354.html http://www.tek-tips.com/viewthread.cfm?qid=257344&page=646 http://www.google.bg/#hl=bg&biw=1255&bih=799&tbs=dsc:1&q=js+redirect+select&aq=f&aqi=&aql=&oq=&fp=86784ef95d248d35
http://stackoverflow.com/questions/580281/redirect-automatically-when-selecting-an-item-from-a-select-drop-down-list http://www.sitepoint.com/forums/javascript-15/javascript-redirect-select-558774.html http://bytes.com/topic/javascript/answers/148524-redirect-url-using-javascript-drop-down-list http://www.ozzu.com/programming-forum/javascript-redirect-statemet-t96354.html http://www.tek-tips.com/viewthread.cfm?qid=257344&page=646 http://www.google.bg/#hl=bg&biw=1255&bih=799&tbs=dsc:1&q=js+redirect+select&aq=f&aqi=&aql=&oq=&fp=86784ef95d248d35
Fakeheal Super Moderator 5 Март 2011 #3 Мерси. [js]function goThere(loc) { window.location.href=loc; }[/js] HTML: <select onChange="goThere(this.options[this.selectedIndex].value)" name="s1"> <option value="http://someurl.com">place1</option> <option value="http://someurl2.com">place2</option> <option value="http://someur3.com">place3</option> </select>
Мерси. [js]function goThere(loc) { window.location.href=loc; }[/js] HTML: <select onChange="goThere(this.options[this.selectedIndex].value)" name="s1"> <option value="http://someurl.com">place1</option> <option value="http://someurl2.com">place2</option> <option value="http://someur3.com">place3</option> </select>