小智 13
我为JQueryUI v1.10.2 - 2013-04-17制作了这段代码
HTML代码:
<select class="combobox" placeholder="123">
<option>...</option>
...
</select>
Run Code Online (Sandbox Code Playgroud)
JS代码:
$.widget( "ui.combobox", {
_create: function() {
this.wrapper = $( "<span>" )
.addClass( "ui-combobox" )
.insertAfter( this.element );
this._createAutocomplete();
this._createShowAllButton();
this.input.attr("placeholder", this.element.attr('placeholder'));
},
});
$(function() {
$( ".combobox" ).combobox();
});
Run Code Online (Sandbox Code Playgroud)
在输入中添加ID并在javascript中运行此代码
$("#yourID").attr("placeholder", "Your Text Here");
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
11180 次 |
| 最近记录: |