1
感謝您提供幫助。 當用戶點擊'提交'時,我已經將表單中的數據填充到對話框中。但是,我想填充並將空字段的默認值更改爲「NIL」。用於填充數據以下是我的代碼:空白字段的默認值
jQuery('#lblCustNameBs').html(jQuery('#custNameBs').val())
jQuery('#lblembossingNameBs').html(jQuery('#embossingNameBs').val())
jQuery('#lblCustMobileBs').html(jQuery('#custMobileBs').val())
該表的代碼如下:
<tr>
<td style="width: 200px !important;">
Salutation :
</td>
<td id ='lblTitleBs' />
</tr>
<tr>
<td style="width: 200px !important;">
Customer Name :
</td>
<td id ='lblCustNameBs' />
</tr>
<tr>
<td style="width: 200px !important;">
Embossing Name :
</td>
<td id ='lblembossingNameBs' />
</tr>
感謝提前:)
'的jQuery( '#lblCustNameBs')。HTML(jQuery的( '#custNameBs')。VAL()|| 'NIL')' –