Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 need help in html, i duno how

views
     
TScse.my
post Oct 18 2020, 03:09 PM, updated 4y ago

Casual
***
Junior Member
452 posts

Joined: Jun 2015


the code i copy paste from from website and the way i do is wrong. i don't know how to do. can anyone help out ?

i just wan when i pick volvo then 2nd option will come out model then 3rd will come out value.

QUOTE
<!DOCTYPE html>
<html>
<body>

<h1>The option element</h1>

<label for="cars">Choose a car:</label>

<select id="cars">
  <option value="volvo">Volvo</option>
  <option value="saab">Saab</option>
  <option value="opel">Opel</option>
  <option value="audi">Audi</option>
</select>
 
  <select id="cars">
  <option value="volvo">S90/V90</option>
  <option value="saab">XC60</option>
  <option value="opel">XC40</option>
  <option value="audi">S60/V60</option>
</select>
 
   
  <select id="cars">
  <option value="volvo">2.0</option>
  <option value="saab">2.5</option>
  <option value="opel">3.0</option>
  <option value="audi">3.5</option>
</select>
 
</body>
</html>


user posted image
Higgsboson8888
post Oct 18 2020, 03:22 PM

Casual
***
Junior Member
347 posts

Joined: Jan 2015


Write some js code to process the selected values
TruboXL
post Oct 18 2020, 03:25 PM

Over 900 useless posts
*****
Junior Member
984 posts

Joined: Jan 2016


I am guessing need more select id?
TScse.my
post Oct 18 2020, 03:31 PM

Casual
***
Junior Member
452 posts

Joined: Jun 2015


QUOTE(Higgsboson8888 @ Oct 18 2020, 03:22 PM)
Write some js code to process the selected values
*
can give example master ?
TScse.my
post Oct 18 2020, 03:32 PM

Casual
***
Junior Member
452 posts

Joined: Jun 2015


QUOTE(TruboXL @ Oct 18 2020, 03:25 PM)
I am guessing need more select id?
*
err i no idea lol, all i studied all back to 20 years ago, all forget sad.gif
Buffalo Soldier
post Oct 18 2020, 03:32 PM

Casual
***
Junior Member
438 posts

Joined: Aug 2005
https://www.w3schools.com/howto/howto_js_ca...ng_dropdown.asp
TScse.my
post Oct 18 2020, 03:37 PM

Casual
***
Junior Member
452 posts

Joined: Jun 2015


QUOTE(Buffalo Soldier @ Oct 18 2020, 03:32 PM)
yea something like this but what i wanted is :

example i choose first one then it will come out first value in 2nd row and then 2nd row avalue in third row.
TScse.my
post Oct 18 2020, 03:45 PM

Casual
***
Junior Member
452 posts

Joined: Jun 2015


QUOTE(Buffalo Soldier @ Oct 18 2020, 03:32 PM)
ok i seems to get it. thanks XD

 

Change to:
| Lo-Fi Version
0.0144sec    0.31    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 11:46 PM