Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何在“选择”字段中的选定选项下划线_Html_Jsp_Select_Option_Underline - Fatal编程技术网

Html 如何在“选择”字段中的选定选项下划线

Html 如何在“选择”字段中的选定选项下划线,html,jsp,select,option,underline,Html,Jsp,Select,Option,Underline,请原谅我提一个基本问题。我是初学者 如何使字段中的选定值选择带下划线,但相应列表中的其他项目(选项)不带下划线 不幸的是,当我使用属性style=“text-decoration:none”标记select,以及属性style=“text-decoration:lined-through”到selected选项时,结果字段select中的selected值没有下划线 另一方面,当我使用attributestyle=“text-decoration:lined-through”标记选择时,所有相应

请原谅我提一个基本问题。我是初学者

如何使字段
中的选定值选择
带下划线,但相应列表中的其他项目(
选项
)不带下划线

不幸的是,当我使用属性
style=“text-decoration:none”
标记
select
,以及属性
style=“text-decoration:lined-through”
到selected
选项时,结果字段
select
中的selected值没有下划线


另一方面,当我使用attribute
style=“text-decoration:lined-through”
标记
选择
时,所有相应的
选项也会加下划线(尽管
style=“text-decoration:none”
)。

您要查找的是:选中的”


请发布一些HTML。很难猜出你的意思对不起,你是指css还是javascript?
select option:checked { 
   text-decoration: lined-through; /*or underline if you want*/
}