0
option and link
hello i would like do any option (with select and option tag) but all optiobn are link who give a new page.... i know do any option, i know do a simpple link but i don't know any link in the option.. i hope that you understand than's a lot
12 Answers
+ 8
Do u want to open that link when the user click on that option ?? If yes, then I think JavaScript will be a good option.
+ 5
I think u want to add links to the option. If that is the case, then u can do :
<select>
<option><a href ="#"></a></option>
</select>
+ 5
I think you should use window.open()
https://www.w3schools.com/jsref/met_win_open.asp
+ 3
You can refer here too :
https://stackoverflow.com/questions/2000656/using-href-links-inside-option-tag
+ 3
Axelle I am unable to get what u are trying to convey. Can u simplify it ??
+ 1
Axelle https://code.sololearn.com/W0aIU7qemZ34/?ref=app. I hope this helps
+ 1
Plus I don't think you can have a link in a select option... What are you linking to? I don't think it can work...
+ 1
Arushi Singhania
i try to be more clear, for exemple page that you have send me (w3school) there is "more " in the black band with any choice abd each choice give a new page.... it's well the tag option for have any choice ?
thank's
0
i have tried it too but it don't give the good result.... the code ( there is only the first choice "link" who have the lknk) :
https://code.sololearn.com/WpGGFEzUGly4/?ref=app
0
yes it's it
.... wht method of js ? 🤔
thank's
0
Arushi Singhania a style of menu that returns to different Pagé
0
sorry I’ve had some problems, it’s maybe a menu thatgive an another page that I would like
thank's