2012年5月31日 星期四

自定義file類型input框樣式的方法





<BODY>
<BR><BR><BR>
<form method="post" action="" enctype="multipart/form-data">
<input type="file" id="pic1" onchange="pic1_name.value=this.value" name="pic1" style="position:absolute;filter:alpha(opacity=0);" size="1" hidefocus>
            <img src="images/iBT_preview.png" alt="" width="90" height="45" border="0" id="BT_preview"  onmousemove="pic1.style.pixelLeft=event.x-60;f.style.pixelTop=this.offsetTop;" onclick="pic1.click()"/>
            </div>
            <div class="txt13px_gray" id="iA-PostNews-PhotoNote1input_">
              <input name="pic1_name" type="text" class="FormInput" id="pic1_name" size="45" />
            </div>
</form>
</BODY>

2012年5月23日 星期三

checkbox唯一選取;checkbox互斥


function toChangeCheckBox(value){
$("input[name='work_area']").each(function(index){
if(index == value){
$(this).removeAttr("checked").attr("checked","checked");
}else{
$(this).removeAttr("checked");
}
});
}



function chooseOne(i){
$('input[name="member_is"]').each(function(index){
if(i == index){
$(this).attr("checked", true);
}else{
$(this).attr("checked", false);
}
});
}

2012年5月22日 星期二

COLSPAN 



<table>
     <tr>
          <td>
          row 1 cell 1
          </td>
          <td>
          row 1 cell 2
          </td>
     </tr>
     <tr>
          <td colspan="2">
          row 2 cell 1
          </td>
     </tr>
</table>

row 1 cell 1.row 1 cell 2
row 2 cell 1



ROWSPAN

<table>
     <tr>
          <td rowspan="2">
          row 1 cell 1
          </td>
          <td>
          row 1 cell 2
          </td>
     </tr>
     <tr>
          <td>
          row 2 cell 2
          </td>
     </tr>
</table>


row 1 cell 1row 1 cell 2
row 2 cell 2