当前位置: 代码迷 >> 综合 >> 详解::enable(启用) 13
  详细解决方案

详解::enable(启用) 13

热度:102   发布时间:2023-11-25 19:15:28.0

核心:启用的

<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Document</title><style type="text/css">.test1:enabled/*启用的类型加上红色的边框*/{
    border: 1px solid red;}.test1:enabled{
    border: 1px solid yellow;/*覆盖*/}</style>
</head>
<body><form>启用:<input type="text" name="username" id="" class="test1">禁用:<input type="text" name="username" id="" disabled="disabled"  class="test1"><br>启用:<textarea class="test1"></textarea>禁用:<textarea class="test1" disabled="false"></textarea><br>启用按钮:<input type="button" name="" value="btn1" class="test1">启用按钮:<input type="submit" name="" value="btn2" class="test1">启用按钮:<input type="reset" name="" value="btn3" class="test1">禁用按钮:<input type="button" name="" value="btn1" class="test1" disabled="disabled">禁用按钮:<input type="submit" name="" value="btn2" class="test1" disabled="disabled">禁用按钮:<input type="reset" name="" value="btn3" class="test1" disabled="disabled"></form></body>
</html>
  相关解决方案