Can anyone please tell me how I can show corresponding content below the select list eg an image of the relevant car - using this or other Javascript but not jQuery ?
Is a something I wrote of a javascript quiz game that I wrote and that was do in vanilla javascript.
I know that isnât exactly what your looking for, but you could accomplish my code by targeting the e (event) handler in the script e.target.value? An have less code than what ws3schools.com did.
I disagree with Paul; w3schools is good for a beginnerâs reference guide site. If your question goes any deeper than âExplain to me in non-programmer-speak what does X tag/method doâ, youâre on the wrong site. Same way you donât go to an elementary school to learn quantum physics, or get that screw out with a hammer - use the right tool for the right job.
As Paul said, bind a function to the change event of your select box, and have it in some way display the image desired - change the SRC on an image tag, or make things display or hidden⌠there are several ways to go about achieving the effect.
What about browser detection? They still use terrible techniques there.
What about their JS summary page? They still recommend ASP. That was discontinued in the year 2000 for .NET and C#, but not a word is said about those there.
I was ready to back down on my opinion, but on reflection it still stands.