• js7:表单的学习,Forms对象


    原文发布时间为:2008-11-09 —— 来源于本人的百度文章 [由搬家工具导入]

    dreamveawer中,选择插入——表单——然后后面的几个选项进行学习:

    大体上这么些类型:

    <html>
    <head>
    <title>js</title>
    </head>
    <body>
    <form action="" method="post" enctype="multipart/form-data" name="form1">
    <label>
    <input type="checkbox" name="checkbox" value="checkbox">
    </label>
    <label>
    <input type="checkbox" name="checkbox2" value="checkbox">
    </label>
    <label>
    <input type="checkbox" name="checkbox3" value="checkbox">
    </label>
    <label>
    <input type="text" name="textfield">
    </label>
    <label>
    <textarea name="textarea"></textarea>
    </label>
    <label>
    <input type="radio" name="radiobutton" value="radiobutton">
    </label>
    <label>
    <select name="select">
    </select>
    </label>
    <label>
    <input type="file" name="file">
    </label>
    <label>
    <input type="hidden" name="hiddenField">
    </label>
    <p>
        <label>
          <input type="radio" name="RadioGroup1" value="单选">
          单选</label>
        <br>
        <label>
          <input type="radio" name="RadioGroup1" value="单选">
          单选</label>
        <select name="menu1" onChange="MM_jumpMenu('parent',this,0)">
          <option value="http://www.baidu.com" selected>xcv</option>
          <option>unnamed1</option>
                                </select>
        <fieldset><legend>t</legend><label></label></fieldset><br>
    </p>
    </form>
    </body>
    </html>

    1、隐藏域的使用

    2、document.forms[] 数组

    3、form1.elements[] 数组

    4、提交按钮触发 onSubmit事件;重置按钮触发 onReset事件

    5、form的两个方法:form1.reset(); form1.submit();

    6、form的length属性获取表单中的元素个数

  • 相关阅读:
    C/C++ 读文件
    算法和数据结构 图表示
    protobuf
    C/C++ jsoncpp
    C/C++ C++11作用域枚举
    腾讯云云函数快速入门实践
    Serverless 与 Flask 框架结合进行 Blog 开发
    从企业微信机器人到小爱同学,用 Serverless 实现生活智能化!
    基于 Serverless 与 Websocket 的聊天工具实现
    云函数 SCF 与对象存储实现 WordCount 算法
  • 原文地址:https://www.cnblogs.com/handboy/p/7148407.html
Copyright © 2020-2023  润新知