と があるこの HTML コードがありdiv
ますbutton
。
ここで、jQuery を使用してdiv
「非表示」を作成し、正しい .xml を選択した場合にのみ表示されます<option>
。しかし、今でbutton
は があまりにもある場合にのみ表示div
されます。
HTML:
<div id="great">
Do you like the netherlands?
<input type="text" id="greatBox" value="Why..."
</div>
<input type="button" id="submitbutton" value="Submit">
JS / Jqueryは次のようになります
(ファイル全体に広がり、残りは必要ありません(推測))
$('#great').hide()
$("#selectlist").change(function(){
var value = $(this).val();
if ($(this).val() == "netherlands") {
$('#great').slideDown(750)
$('#other').hide()
}
if ($(this).val() == "other") {
$('#great').hide()
}
});
ボタンにバインドされた jQuery/javascript はまだありません。