平时开发时经常用的一些javascrpt片断

javascript片断

  l=document.createElement("IMG");
    l.src="/ConcordePDM/images/sortNone.gif";
    l.id="srtImg";
    l.width=10;
    l.height=9;

    if (clickCell.innerHTML.indexOf("<") == -1)
      clickCell.insertAdjacentElement("beforeEnd", l);
    clickCell.attachEvent("onclick", doClick);
   
   
   function dodeletereply(id,srtaget)
  {
   if (!confirm("确定删除吗?"))
    return;
   var tabRow;
   tabRow = srtaget.parentNode;
   while (tabRow.tagName != "TABLE")
    tabRow = tabRow.parentNode;
   tabRow.removeNode(true);
   //alert(id "已经删除");
  }
  
  
 while (clickObject.tagName != "TH")
  {
    clickObject = clickObject.parentElement;
  }
 
 
  isNaN(current)
  insert  = insert.toLowerCase();
  insert  = insert.toUperCase();
 
  if (a[i].indexOf("#") != 0)
 
   window.status =
  
           var thisRow = inputKeySet[i].parentNode.parentNode;
        if (thisRow.cells(1).childNodes(0).checked)
       
      newTR.cells[0].innerText = tableObject.rows.length-2;
      newTR.scrollIntoView(true);
   opener.location.href
  
    // 若還沒 Query 完, 則加上一個 More 的字樣
    if (eval(publishingTotalSize.innerHTML) > eval(publishingShowSize.innerHTML)) {
      var oTr = tablePublishList.insertRow(-1);
      oTr.insertCell();
      oTr.cells(0).colSpan = "2";
      oTr.cells(0).style.cursor = "hand";
      oTr.cells(0).style.backgroundColor = "pink";
      oTr.cells(0).style.fontWeight = "bold";
      oTr.cells(0).innerHTML = "<%=dicBook.getValue("System.more", request.getLocale())%>";
      oTr.cells(0).onclick = function(){submitPublishQuery(eval(publishingShowSize.innerHTML) 1);};
    }

  function layoutPublishingResult(dom){
    if (dom != null) {
      var oNodeList = dom.selectNodes("Publishings/Pair/PublishingLog");
      for (var i=0; i<oNodeList.length; i ) {
        var InsRecord = new Array();
        var publishKey = getNodeValue(oNodeList.item(i).selectSingleNode("Key"));
        InsRecord[0]  = "<a href=javascript:submitReceiverQuery('" publishKey "')>" publishKey "</a>&nbsp;";
        InsRecord[1]  = "<a href=javascript:submitReceiverQuery('" publishKey "')>" getNodeValue(oNodeList.item(i).selectSingleNode("DocId")) "</a>&nbsp;";
        InsRecord[2]  = getNodeValue(oNodeList.item(i).selectSingleNode("DocVersion")) "&nbsp;";
        InsRecord[3]  = "<a href=javascript:submitReceiverQuery('" publishKey "')>" getNodeValue(oNodeList.item(i).selectSingleNode("DocName")) "</a>&nbsp;";
        InsRecord[4]  = getNodeValue(oNodeList.item(i).selectSingleNode("Title")) "&nbsp;";
        InsRecord[5]  = getNodeValue(oNodeList.item(i).selectSingleNode("SenderName")) "&nbsp;";
        InsRecord[6]  = getNodeValue(oNodeList.item(i).selectSingleNode("PublishDate")) "&nbsp;";

        var newTR = createTR(tablePublishList, InsRecord);

        newTR.cells[0].align = "center";
      }
    }
  }
 
  submitPublishQuery(eval(publishingShowSize.innerHTML) 1);
 
     document.URL = linkPanel.children(0).href;
    
    
  var xmlDoc=new ActiveXObject("MSXML2.DOMDocument");
 flag=xmlDoc.loadXML("");

  newNode =xmlDoc.createElement("±?")
  MarkNode=xmlDoc.documentElement.appendChild(newNode);
  newNode =xmlDoc.createElement("StartMark")
  newNode.text=StartMark;
  MarkNode.appendChild(newNode)
  newNode =xmlDoc.createElement("EndMark")
  newNode.text=EndMark;
  MarkNode.appendChild(newNode)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值