var delta=0.15 var collection; var http_request = false; var cGetRow=-99999; var appPath ="/shcu"; //清除表格的内容 function DelRow(ojbTable){ var objT=document.all(ojbTable); while(objT.rows.length>1){ objT.deleteRow(); } } function DelRowByIndex(ojbTable,iIndex) { var objT=document.all(ojbTable); if(iIndex==-99999) alert("系统提示:没有选中行号!"); else objT.deleteRow(iIndex); } function DelRowByIndexs(ojbTable,iIndexs) { for(var i =iIndexs.length-1 ; i >= 0 ; i--){ DelRowByIndex(ojbTable,iIndexs[i]); } } function GetRow(){ cGetRow=window.event.srcElement.parentElement.parentElement.rowIndex; } function send_request(url) { if(window.XMLHttpRequest) { http_request = new XMLHttpRequest(); if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); } } else if (window.ActiveXObject) { try { http_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { http_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} } } if (!http_request) { window.alert("初始化脚本失败"); return false; } http_request.onreadystatechange = processRequest; // 确定发送请求的方式和URL以及是否同步执行下段代码 http_request.open("GET", url, true); http_request.send(null); } // 处理返回信息的函数 function processRequest() { if (http_request.readyState == 4) { // 判断对象状态 if (http_request.status == 200) { // 信息已经成功返回,开始处理信息 execScript(http_request.responseText,"JScript"); } else { //页面不正常 alert("您所请求的页面有异常。"); } } } //适用范围:购买卡,配件,终端 //参数说明:commidtyid商品ID function addProductToCar(commodityid,num){ alert(commodityid); var url = appPath+ "/shopping/addShoppingCar1.do"; url = url + "?commodityid="+ commodityid +"&number="+num; send_request(url); } //适用范围:初始包+预付费号;套餐+后付费号 //参数说明: // commidtyid 初始包或套餐商品ID // number 预付费号或后付费号 function addCommodityToCar(commodityid,number){ var url = appPath+"/shopping/addShoppingCar2.do"; url = url + "?commodityid="+ commodityid + "&number="+number ; send_request(url); } //适用范围:后付费号+终端+套餐;套餐+终端+后付费号 //参数说明: // commidtyid 初始包或套餐商品ID // terminalid 终端商品ID // number 预付费号或后付费号 function addCommodityToCarThree(commodityid,terminalid,number){ var url = appPath+"/shopping/addShoppingCar3.do"; url = url + "?commodityid="+ commodityid +"&terminalid="+terminalid +"&number="+number; send_request(url); } function floaters() { this.items = []; this.addItem = function(id,x,y,content) { document.write('
');
//theFloaters.addItem('followDiv3',7,385,'
');
//theFloaters.addItem('followDiv4','document.body.clientWidth-127',385,'
');
// theFloaters.play();