Some usage of input

1, the data access objects in the input text box format

<input id="test" type="hidden" name="test" />
var testList = [{"a":"1"},{"b":"2"}];

//
$("#test").data("result",testList);
//
$("#test").data("result");

 

 

2, input of attribute list

Effects (can be input, drop-down selection, can already think of the pull-down):

 

 

<input list="browsers">

<datalist id="browsers">
  <option value="Internet Explorer">
  <option value="Firefox">
  <option value="Google Chrome">
  <option value="Opera">
  <option value="Safari">
</datalist>

Examples: https://www.runoob.com/try/try.php?filename=tryhtml5_datalist

Guess you like

Origin www.cnblogs.com/alberGeng/p/12166681.html