zoukankan      html  css  js  c++  java
  • input 禁止删除部分文字

    用label和所需的input链接,label部分就是禁止删除的部分。
    <input type="text" name="city" value="" class="input" placeholder="选择城市" id="CityText" onclick="openCityList22(this)" /><br/> <label for="cityaddress" id="lcity" style="position: absolute;padding-left:1rem;height: 4rem;line-height: 4rem;font-size: 1.5rem;"></label> <input style="text-indent: 42px; background:transparent;" type="text" name="addr" id="cityaddress" value="" class="input" placeholder="企业住所/经营场所" /> $(function(){ $('#lcity').html(''); $('#cityaddress').css({'text-indent':'0'}); }) $(".num_name").click(function(){ $('#lcity').html($(this).text()); $('#cityaddress').css({'text-indent':'42px'}); if(c.placeholder=="选择城市"){ $("#cityListBox").css({display:"none"}); $("#CityText").val($(this).text()); }else if(c=="选择城市"){ $('#lcity').html(''); $('#cityaddress').css({'text-indent':'0'}); $("#cityListBox").css({display:"none"}); $("#CityText").val($(this).text()); } });

    要求:

  • 相关阅读:
    一意孤行
    叶子书签
    漫舞
    男朋友
    ubuntu自动关机命令,ubuntu 无法关机解决方法
    情人节
    生死由天
    春暖花开
    android开发学习中的问题:error: device not found解决办法
    暗恋
  • 原文地址:https://www.cnblogs.com/yongwang/p/7049071.html
Copyright © 2011-2022 走看看