,Select:
<div class= "Form-group" >
<label for= "" class= "col-sm-3 Control-label" > Role type </label>
< Div class= "col-sm-9" >
<select id= "typeID" name= "Role_type" datatype= "*" >
<option value= "1" > Public </option>
<option value= "0" > Private </option>
</select>
</div>
</ Div>
Select the method:
$ ("#typeId"). Val (Data.type); /**/data.type the data returned for the backend needs to be aware that the value of the JSON property is the same as the value attribute in option, otherwise you cannot select the *
Radio:
<div class= "Form-group" >
<label for= "" class= "col-sm-3 Control-label" > account status </label>
< Div class= "col-sm-9" >
<label class= "Radio-inline" >
<input type= "Radio" name= "Status" value= "1" >
effective
</label>
<label class= "Radio-inline" >
<input type= "Radio" name= "status" Value= "0" >
invalid
</label>
</div>
</div>
Select the method:
$ ("input[name=status][value=" + Data.status + "]"). attr ("Checked", true);