我使用的是jQuery 1.6.2。
我使用ColdFusion和jQuery动态填充选择框。
当返回选项并将其填充到选择框中时,我会使用jQuery来计算出有多少选项,并根据需要调整大小。
// load the options into the select box
$("#Select").load("GlobalAdmin/ArtistUnassociatedAlbums.cfm?" + QString);
// test the number of options
var NumOfOptions = $();
var BoxSize = 0;
/
我有两个选择框
其中一个是动态的另一个是静态的
动态的是使用javascript (获取和填充facebook好友)加载的,如下所示
function (response) {
//console.log(response);
var xxx = '<select id="friend" class="msdropdown" name="friend">';
for (i = 0; i
我已经写了一个javascript来动态生成textbox。
代码:
function addtextbox(val)
{
var foo = document.getElementById('fooBar');
var num = (document.getElementById('cnt').value -1 + 2);
ingrds[num]= val;
var newdiv = document.createElement('div');
var divIdName = 'divid'+num;