zoukankan      html  css  js  c++  java
  • 控制input输入的三种方法(一js实现)

    <!doctype html>
    <html lang="en">
     <head>
      <meta charset="UTF-8">
      <title>Document</title>
      <script language="Javascript">
        function hide() {
            var mode = document.getElementById("mode");
            var hykhLk = document.getElementById("hykh_lk");
            if (mode.value != 1)
            {
                hykhLk.setAttribute("readOnly",true);
                hykhLk.style.backgroundColor="#d2d2d2";
            }
            else
            {
                hykhLk.removeAttribute("readOnly");
                hykhLk.style.backgroundColor="#ffffff";
            }
        }
      </script>
     </head>
     <body>
      <select name="mode" id="mode" class="dept_select" style=" 100px;" onClick="hide()">
        <option value="1" #if($resultMap.mode==1)selected#end>离场车辆</option>
        <option value="2" #if($resultMap.mode==2)selected#end>进场车辆</option>
        <option value="3" #if($resultMap.mode==3)selected#end>滞留车辆</option>
    </select>
    <input type="text" name="hykh_lk" id="hykh_lk" value="124" style=" 100px;" class="text"/>
     </body>
    </html>

  • 相关阅读:
    pymongo 常用方法
    字典判断是否具备 key
    flask中的request和常用属性方法
    zipfile 解压,py3 win下中文乱码
    远程登录mongo
    eval
    二分查找
    快速排序
    Python3解leetcode Single Number
    Python3解leetcode Best Time to Buy and Sell Stock II
  • 原文地址:https://www.cnblogs.com/mm-happy/p/4649018.html
Copyright © 2011-2022 走看看