Posted on 2008-10-09 18:22
追梦人 阅读(198)
评论(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;
//部队数量
var inputcount = document.createElement('input');
inputcount.type = 'hidden';
inputcount.name = 'bigarmycount';
inputcount.id = 'bigarmycount';
inputcount.value = armycount;
bigtd.appendChild(document.createTextNode(" "+armyname+" 数量:"+armycount));
bigtd.appendChild(inputid);
bigtd.appendChild(inputcount);
}