文檔半島外圍網(wǎng)上直營>>telerik中文文檔>>浮動標簽
                浮動標簽
立即下載Kendo UI for jQuery
浮動標簽是表單或輸入字段的占位符文本,它浮動在該字段上方,并且在用戶開始與該字段交互時保持可見。
要在 Kendo UI of jQuery 中為AutoComplete實現(xiàn)浮動標簽,請將其定義為字符串或函數(shù)。
以下示例演示了如何將浮動標簽設置為字符串:
<input id="autocomplete" />
<script>
$(document).ready(function(){
$("#autocomplete").kendoAutoComplete({
dataSource:[
{ text: "John" },
{ text: "Patrick" },
{ text: "Simon"}
],
dataTextField:"text",
label: {
content: "First Name",
floating: true
}
});
});
</script>
以下示例演示了如何從函數(shù)設置浮動標簽:
Copy code <input id="autocomplete" />
<script>
$(document).ready(function(){
$("#autocomplete").kendoAutoComplete({
dataSource:[
{ text: "John" },
{ text: "Patrick" },
{ text: "Simon"}
],
dataTextField:"text",
label: {
content: function(){
return "First Name";
},
floating: true
}
});
});
</script>                
            
 QQ交談
QQ交談 在線咨詢
在線咨詢 
                 
                
 渝公網(wǎng)安備
            50010702500608號
渝公網(wǎng)安備
            50010702500608號
             
            
 客服熱線
客服熱線