下拉菜单select带图标
XML/HTML Code
- <div class="container">
- <form>
- <div class="form-item">
- <input id="country_selector" type="text">
- <label for="country_selector" style="display:none;">Select a country here...</label>
- </div>
- <div class="form-item" style="display:none;">
- <input type="text" id="country_selector_code" name="country_selector_code" data-countrycodeinput="1" readonly="readonly" placeholder="Selected country code will appear here" />
- <label for="country_selector_code">...and the selected country code will be updated here</label>
- </div>
- <button type="submit" style="display:none;">Submit</button>
- </form>
- </div>
JavaScript Code
- <script>
- $("#country_selector").countrySelect({
- preferredCountries: ['cn', 'gb', 'us']
- });
- </script>
原文地址:http://www.freejs.net/article_biaodan_822.html