+ -
当前位置:首页 → 问答吧 → jQuery FlexBox 如何设置默认值,

jQuery FlexBox 如何设置默认值,

时间:2011-07-10

来源:互联网

JScript code

var countries = {};   
3.countries.results = [{id:'AF',name:'Afghanistan'}];   
4.countries.total = countries.results.length;   
5.$(function() {   
6.           //dp.SyntaxHighlighter.HighlightAll('code');   
7.           // Do not autocomplete initial value, and handle non-existent values   
8.           $.post("${portal}/class/classAction_FlexBoxTeacherList.action",     
9.            {"param.class_id":1},                      
10.            function(tag){     
11.                countries.results =eval("(" + tag + ")");   
12.                countries.total = countries.results.length;   
13.                                   
14.                $('#ffb8').flexbox(countries, {   
15.                    autoCompleteFirstMatch: false,   
16.                    noResultsText: '',   
17.                    width:135,   
18.                    onSelect: function() {   
19.     document.getElementById("class_teacher").value=$('input[name=ffb8]').val();   
20.                }   
21.                });   
22.                $('#ffb8_input').blur(function() {   
23.     document.getElementById("class_teacher").value=$('input[name=ffb8]').val();   
24.                });   




在编辑时怎么能把已保存的设置为默认值呢 

作者: xwt799023   发布时间: 2011-07-10

Methods
setValue() is the only method, and allows you to set the display value of the input box after the FlexBox has loaded.

作者: inetfuture   发布时间: 2011-07-10

楼上说的setValue()应该可以。

作者: lsw645645645   发布时间: 2011-07-10