网页的下拉菜单是空白的?
HTML<select>下拉框中,可以通过设定一个空值来使开始显示的是空白(如设置第一行<optionvalue="kongbai"></option>为空)。操作代码如下:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>SELECT开始显示空白</title></head><body><select><option value="kongbai"></option> <option value="first">first</option> <option value="second">second</option> <option value="three">three</option> <option value="four">four</option></select></body></html>详细代码见附件。效果图如下图所示:
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号
广州京杭网络科技有限公司 版权所有