天天看点

td定位代码

<head>

<link rel="stylesheet" href="../css/daiwa.css" type="text/css">

<title>Administrator - Daiwa SMBC Syndicate Management System

Equity Version</title>

</head>

<script type="text/javascript">

<!--

   var i=0;

   function add()

   {

     if (i<10){

     i=i+1;

  spanrows= tdr.getAttribute("rowspan");

  tdr.rowSpan=spanrows + 1;

        var table=document.getElementById("table");

     var row=table.insertRow();

     var cell=row.insertCell();

     cell.parentElement.id=i;

     var button=document.getElementById("button");

     var pos = new CPos(button.offsetLeft, button.offsetTop);

     var button = button.offsetParent;

     while (button)

     {

         pos.x += button.offsetLeft;

         pos.y += button.offsetTop-50;

         button = button.offsetParent;

     }

     cell.innerHTML="<input type=\"text\" value=\""+i+"\"/>";

        }

  function CPos(x, y)

  {

      this.x = x;

      this.y = y;

  }    

//-->

</script>

<body topmargin="0" leftmargin="0">

<html:form action="/Daiwa/AddText.do">

 <table id="tbl" border="0" height=500>

  <tr>

   <td>

   <table id="table" border="0" height=50>

    <tr>

     <td height=25><b>ƒvƒ‰ƒCƒXƒg[ƒN“ü—Í—“</b></td>

     <td><html:button property="button" value="add"

       /></td>

    </tr>

    <c:forEach var="proconInputlist"

     items="${proconInputFrom.proconInputlist}" varStatus="status">

     <tr>

     <c:if test="${status.last}">

      <td rowspan="2" valign="bottom"><html:text name="proconInputlist"

       property="protectionAmount" indexed="true" /></td>     

      <td id="tdr" valign="bottom"><input type="radio" name="unit"

       value="bp" checked>bp <input type="radio" name="unit"

       value="%">%<br>

      </td>

     </c:if>

     </tr>

    </c:forEach>

   </table>

   </td>

  </tr>

 </table>

</html:form>

</body>

</html>

下一篇: csv出力

继续阅读