I cannot figure out how to POST the option the user chooses from the drop down list that's named "Drop".
Whichever option the user chooses when they click submit, I want it to POST the drop down list's value to something.php
So for example if the user chooses Monthly or Hourly, it should post "Hourly" or "Monthly" to something开发者_C百科.php
How can this be done?
http://pastebin.com/Lr4a8KMq
<select id="mySelect" name="Drop" class="testingStyles">
    <option>Month</option>
    <option>Week</option>
    <option>Day</option>
    <option>Hour</option>
</select>
<input type="button" class="formbutton" onclick="getIndex()" value="Alert index of selected option">
<br/>
<br/>
<form Method ="POST" action="something.php">
    <div id="numbers">
    </div>
    <input type="submit" style="width: 75px; border: 1px solid gray" class="formbutton" value="Submit">
</form>
The problem is that the drop-down is not part of the <form> element. Move the form's start tag up to include the drop-down.
Move <form  Method="POST" action="something.php"> to above the <select> tag.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论