zoukankan      html  css  js  c++  java
  • 【input】——数据传入后台

    1.复选框 checkbox

    <label class="checkbox">

      <input type="checkbox" name="c1" value="ck1"/>复选框1

    </label>

    <label class="checkbox">

      <input type="checkbox" name="c2" value="ck2"/>复选框2

    </label>

    对应model:

    public string c1 {get;set;}

    public string c2 {get;set;}

    在controller中:

    public ActionResult SearchButton (string c1)

    { return View(); } 设置断点就可以查看数据,以下同理

    2.单选框 radio

    <label class="radio">

      <input type="radio" name="r" value="r1"/>单选框1

    </label>

    <label class="radio">

      <input type="radio" name="r" value="r2"/>单选框2

    </label>

    对应model:public string r {get;set;}

    3.文本框 text

    <input type="text" name="text1" value=""/>

    对应model:public string text1 {get;set;}

    4.密码框 password

    <input type="password" name="password1" value=""/>

    对应model:public string password1 {get;set;}

    5.文本域 textarea

    <textarea name="textarea1"></textarea>

    对应model:public string textarea1 {get;set;}

  • 相关阅读:
    lua module
    lua require
    lua io
    lua table2
    lua table1
    【leetcode】魔术排列
    【leetcode】速算机器人
    【leetcode】黑白方格画
    【leetcode】根据数字二进制下 1 的数目排序
    【leetcode】插入区间
  • 原文地址:https://www.cnblogs.com/YYvam1288/p/5388095.html
Copyright © 2011-2022 走看看