那么我该如何更改应该显示多个启用的select标记的行数:
<select multiple="multiple">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
</select>
Run Code Online (Sandbox Code Playgroud)
这只会显示前四个选项如何显示第五个而不必滚动?
反正有没有这样做:
if (document.getElementById("x").value == 2 || document.getElementById("x").value == 3) {
//Do somthing
}
Run Code Online (Sandbox Code Playgroud)
#我可以通过这种方式简单地做到这一点,我试过但它不起作用:
if (document.getElementById("x").value == 2 || 3) {
//Do somthing
}
Run Code Online (Sandbox Code Playgroud)