Posted on 2008-10-09 18:22
追夢人 閱讀(205)
評論(0) 編輯 收藏 所屬分類:
Javascript
function addarmy3()
{
var army = document.getElementById('armysortid3');
var armyid = army.value;
var armyname = army.options[army.selectedIndex].innerHTML;
var armycount = document.getElementById('armycount3').value;
var bigtd = document.getElementById('bigtd');
//部隊編號
var inputid = document.createElement('input');
inputid.type='hidden';
inputid.name='bigarmyid';
inputid.id='bigarmyid';
inputid.value=armyid;
//部隊數(shù)量
var inputcount = document.createElement('input');
inputcount.type = 'hidden';
inputcount.name = 'bigarmycount';
inputcount.id = 'bigarmycount';
inputcount.value = armycount;
bigtd.appendChild(document.createTextNode(" "+armyname+" 數(shù)量:"+armycount));
bigtd.appendChild(inputid);
bigtd.appendChild(inputcount);
}