Why the links below works in Mozilla Firefox but don't work in Google Chrome? Any problems in my code and how to fix it?
<select>
<option onclick="window.open('https://www.google.com/');"> Example1</option>
<option onclick="window.open('https://www.google.com/');"> Example2 </option>
<option onclick="window.open('https://www.google.com/'); " >Example3</option>
</select>
this will work only if saved in .html file. not on some online editor
<select onchange="this.options[this.selectedIndex].value && (window.open( this.options[this.selectedIndex].value));">
<option value="">Select...</option>
<option value="http://google.com">Google</option>
<option value="http://yahoo.com">Yahoo</option>
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments