, was im versuchend zu tun ist, wenn der <option>
der Wert angeklickt wird, wird hier im <input type='text'>
Wie man onClick in HTML-Option hinzufügen?
angezeigt ist mein Code jetzt:
<select id='months'>
<option value='9' id='months9'>9 Months</option>
<option value='10' id='months10'>10 Months</option>
<option value='11' id='months11'>11 Months</option>
<option value='12'id='months'>12 Months</option>
</select>
if($months == '9'){
echo 'today +9 months';
}
if($months == '10'){
echo 'today + months';
}
if($months == '11'){
echo 'today +11 months';
}
if($months == '12'){
echo 'today +12 months';
}
<input type='text' name='signoff_date'>
HINWEIS: ich diesen Code weiß, ich werde nicht funktionieren‘ Ich gebe dir nur eine Idee, wie mein Programm funktioniert.
Ich hoffe, Sie verstehen es. Dank
bisher i PHP-Codes nur versucht, die nur den Wert des eingegebenen Textes ändert sich nach Sie reichen das Formular ein –
Mögliches Duplikat von [Javascript - onchange innerhalb
Bitte überprüfen Sie dieser Link: -http: //stackoverflow.com/questions/3487263/how-to-use-onclick-on-onselect-on-option-tag-in-a-jsp-page –