zoukankan      html  css  js  c++  java
  • 表单的提交获取

    表单数据如何提交给php文件

    <form action="del.php" method="post">

    1.text数据

    <input type="text" name="username">

    2.password数据

    <input type="password" name="pwd">

    3.radio单选框

    <p>选择科目</p>
    <p>
    </label>
    <input type="radio" name="kemu" value="php">php</label>
    </p>
    <p>
    <label>
    <input type="radio" name="kemu" value="java">java
    </label>
    </p>

    4.checkbox多选数据

    <p>选则爱好</p>
    <p>
    </label>
    <input type="checkbox" name="love[]" value="wan">wan</label>
    </p>
    <p>
    <label>
    <input type="checkbox" name="love[]" value="chi">chi
    </label>
    </p>
    <p>
    <label><input type="checkbox" name="love[]" value="he">he</label>
    </p>

    5.select下拉菜单数据

    <p>选择地点</p>
    <p>
    <select name="city" id=''>
    <option>bj</option>
    <option>sz</option>
    <option>sh</option>
    </select>
    </p>

    6.textarea文本与数据

    <textarea name="mess"></textarea>

    7.提交按钮

    <input type="submit" value="ok">
    <input type="reset" value="cancel">

    php接收

    <?php
    echo "<pre>";
    print_r($_POST);
    echo "</pre>";

    ?>

    勤学似春起之苗,不见其增,日有所长; 辍学如磨刀之石,不见其损,日所有亏!
  • 相关阅读:
    Power of Cryptography
    Radar Installation
    Emag eht htiw Em Pleh
    Help Me with the Game
    89. Gray Code
    87. Scramble String
    86. Partition List
    85. Maximal Rectangle
    84. Largest Rectangle in Histogram
    82. Remove Duplicates from Sorted List II
  • 原文地址:https://www.cnblogs.com/qiaozhiming123/p/12769479.html
Copyright © 2011-2022 走看看