0
我使用jQuery的日期選擇器,請參見下面的代碼如何添加ALIGN =「absMiddle」 jQuery的日期選擇器
$(document).ready(function()
{
$(".txtDate").datepicker({
showOn: 'button',
buttonImage: '../images1/calendar.gif',
buttonImageOnly: true,
dateFormat: 'dd/mm/yy',
showOtherMonths: true,
showStatus: true,
onSelect:function(){}
});
});
和使用日期選擇器後生成的代碼如下:
<td class="gridWidth175">
<input type="text" class="txtDate hasDatepicker" id="ctl00_ContentPlaceHolder2_txtFromSearchDate" name="ctl00$ContentPlaceHolder2$txtFromSearchDate"/><img class="ui-datepicker-trigger" src="../images1/calendar.gif" alt="..." title="..."/>
<input type="text" class="txtDate hasDatepicker" id="ctl00_ContentPlaceHolder2_txtToSearchDate" name="ctl00$ContentPlaceHolder2$txtToSearchDate"/><img class="ui-datepicker-trigger" src="../images1/calendar.gif" alt="..." title="..."/>
</td>
現在,如果您看到有空白的「alt」和「title」,我想給予alt文本以及我想添加「align ='absMiddle',以便在頁面上呈現之前,我的img標記將如下所示:
<img class="ui-datepicker-trigger" src="../images1/calendar.gif" alt="Select Date" title="Date" align="absMiddle"/>
請幫忙!
非常感謝Rayell的幫助! – 2009-09-09 05:56:53