• html表单的方便操作


    //表单阻止复制粘贴

    <input class="pass" type="text" oncopy="return false" oncut="return false" placeholder="密  码:" title="password"></input>

    //表单阻止重复提交

    <input type="button" value="确定" onclick="this.disabled=true; this.form.submit();"/>

    //空格提醒

    <script type="text/javascript">
    function deal(form){
    for(i=0; i < form.length; i++){
    if(form.elements[i].value == ''){
    alert(form.elements[i].title + "不能为空");
    }
    }
    }
    </script><form name="form1">

    <tr>
    <td>销售编号:</td>
    <td><input type="text" name="num" title="销售编号"></td>
    </tr>
    <input type="button" onClick="deal(this.form);" id="change" value="提交">
    <input type="reset" value="重置"/>
    </form>
    ---------------------
    参考
    原文:https://blog.csdn.net/u012310056/article/details/78050985

  • 相关阅读:
    程序员修炼之道:从小工到专家有感2
    3月13日
    第一次结对作业(2)
    3月12日
    3月11日
    第一次结对作业
    3月10日
    11月6日
    10月28日
    10月7日
  • 原文地址:https://www.cnblogs.com/nature-wind8/p/10609194.html
Copyright © 2020-2023  润新知