jquery json 传递数据
jquery json 传递数据
XML/HTML Code
- <div id="page">
- <div class="content" id="section-main">
- <div id="hierarchical-demo" class="section">
- <h4>JSON</h4>
- <form name="json_hierarchal" id="json-hierarchal">
- <div style="padding:10px 20px 10px 10px;">
- <textarea name="json" rows="12" wrap="virtual" class="textarea code" style="width:100% !important" />{
- personal:{
- first_name:'Dave',
- last_name:'Stewart',
- country:'england'
- },
- contact:{
- email:'dave@davestewart',
- phone:'020 0000 0000',
- method:'phone'
- }
- }
- </textarea>
- <div class="json-sample" id="json-simple-sample"> </div>
- <input type="button" class="button" value="确定" style="width:100% !important; margin:10px 0px 0px 5px;" onclick="populateForm('hierarchal')" />
- <input type="button" class="button" value="重置" style="width:100% !important; margin:10px 0px 0px 5px;" onclick="resetForms('hierarchal')" />
- </div>
- </form>
- <h4>Form controls</h4>
- <form name="form_hierarchal" id="form-hierarchal" action="" method="post" target="_blank" style="margin-top:15px">
- <fieldset>
- <legend>Personal</legend>
- <ul class="controls">
- <li>
- <label for="first-name">First Name</label>
- <input name="personal[first_name]" id="personal-first-name" type="text" class="text" maxlength="" value="" />
- </li>
- <li>
- <label for="last-name">Last Name</label>
- <input name="personal[last_name]" id="personal-last-name" type="text" class="text" maxlength="" value="" />
- </li>
- <li>
- <label for="personal[country]">Country</label>
- <select name="personal[country]" id="personal-country" class="select-multiple" >
- <option value="" selected="selected">Select...</option>
- <option value="">- - - - - - - - - - - - - - - - - - - - - - </option>
- <option value="england">England</option>
- <option value="scotland">Scotland</option>
- <option value="wales">Wales</option>
- <option value="ireland">Ireland</option>
- </select>
- </li>
- </ul>
- </fieldset>
- <fieldset>
- <legend>Contact</legend>
- <ul class="controls">
- <li>
- <label for="email">Email</label>
- <input name="contact[email]" id="email" type="text" class="text" maxlength="" value="" />
- </li>
- <li>
- <label for="phone">Phone</label>
- <input name="contact[phone]" id="phone" type="text" class="text" maxlength="" value="" />
- </li>
- <li>
- <label for="method">Prefered</label>
- <fieldset id="method">
- <label><input name="contact[method]" id="" type="radio" class="radio" value="email" /> Email</label>
- <label><input name="contact[method]" id="" type="radio" class="radio" value="phone" /> Phone</label>
- </fieldset>
- </li>
- </ul>
- </fieldset>
- </form>
- </div>
- <hr />
- </div>
- </div>
相关推荐
周公周金桥 2020-09-06
大象从不倒下 2020-07-31
AlisaClass 2020-07-19
MaureenChen 2020-04-21
xingguanghai 2020-03-13
teresalxm 2020-02-18
木四小哥 2013-05-14
SoShellon 2013-06-01
Simagle 2013-05-31
羽化大刀Chrome 2013-05-31
waterv 2020-01-08
LutosX 2013-07-29
vanturman 2013-06-27
wutongyuq 2013-04-12
luoqu 2013-04-10
today0 2020-09-22
89520292 2020-09-18
bigname 2020-08-25