createElement

          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);
               }

          只有注冊用戶登錄后才能發(fā)表評論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 崇文区| 苏尼特左旗| 阿鲁科尔沁旗| 德格县| 天门市| 邢台县| 泗阳县| 万全县| 正安县| 东乌珠穆沁旗| 秦皇岛市| 陇川县| 哈密市| 兰考县| 怀集县| 肥乡县| 和林格尔县| 科尔| 安化县| 正镶白旗| 台南县| 池州市| 吉安市| 牙克石市| 太和县| 承德市| 手游| 茶陵县| 新沂市| 和田县| 安福县| 屯昌县| 中牟县| 阿拉善右旗| 红河县| 伊金霍洛旗| 个旧市| 威宁| 英吉沙县| 平阴县| 长丰县|