相关疑难解决方法(0)

如何通过select显示/隐藏div.(jquery)

我的代码:

<select id="select">
<option id="1" value="thai language">option one</option>
<option id="2" value="eng language">option two</option>
<option id="3" value="other language">option three</option>
</select>

<div id="form1">content here</div>
<div id="form2">content here</div>
<div id="form3">content here</div>
Run Code Online (Sandbox Code Playgroud)

我想要的是在选择选项1时显示div#form1并隐藏form2 + form3,或者选择选项2显示div#form2并隐藏form1 + form2

html jquery select show hide

5
推荐指数
1
解决办法
4万
查看次数

标签 统计

hide ×1

html ×1

jquery ×1

select ×1

show ×1