$(document).ready(function() {
var ttline2 = $('#FIELD_' + FieldIDS['TT_Line2']);
ttline2 = $('#FIELD_' + FieldIDS['BadgeHolder']; + $('#FIELD_' + FieldIDS['strap_clip']; + $('#FIELD_' + FieldIDS['Lanyard'];
});
所以我上面的代碼是這樣的。 我有3個單選按鈕,每個單選按鈕都有一個值,每個值需要添加到輸入字段,輸入字段是TT_Line2。我可以使用$('#FIELD_'+ FieldIDS ['Lanyard'];)打電話給特定的字段,它表示使用點符號會更好。單選按鈕,填充輸入值
問題, 我無法將此傳遞給輸入字段。不過新形成的填充。
這裏是我的HTML代碼
<tbody><tr valign="top" style="width: 125px; "><td style="width: 125px"><input type="radio" name="FIELD_1366" id="FIELD_1366" value="No"><span>No</span>
</td>
</tr>
<tr valign="top" style="width: 125px; "><td style="width: 125px"><input type="radio" checked="" name="FIELD_1366" id="FIELD_1366" value="BadgeHolder"><span>Yes</span>
</td>
</tr>
</tbody>
<tbody><tr valign="top" style="width: 125px; "><td style="width: 125px"><input type="radio" name="FIELD_898" id="FIELD_898" value="No"><span>No</span>
</td>
</tr>
<tr valign="top" style="width: 125px; "><td style="width: 125px"><input type="radio" checked="" name="FIELD_898" id="FIELD_898" value="BulldogClip"><span>Yes</span>
</td>
</tr>
</tbody>
<tbody><tr valign="top" style="width: 200px; "><td style="width: 200px"><input type="radio" name="FIELD_1276" id="FIELD_1276" value="No"><span>No</span>
</td>
</tr>
<tr valign="top" style="width: 200px; "><td style="width: 200px"><input type="radio" checked="" name="FIELD_1276" id="FIELD_1276" value="White"><span>White</span>
</td>
</tr>
<tr valign="top" style="width: 200px; "><td style="width: 200px"><input type="radio" name="FIELD_1276" id="FIELD_1276" value="Black"><span>Black</span>
</td>
</tr>
</tbody>
<div class="fieldSpacer" id="DIV_119"><p class="fieldSpacer">JDELITM</p><p><input value="50-D-EXPKOE-V-F" style="width: 200px; " name="FIELD_119" id="FIELD_119"></p>
<script language="javascript">
FieldIDs["JDELITM"] = 119;
</script>
<div id="VALID_VAR_119" style="display:none" class="validationError"></div>
</div>
我改變了我的周圍看到劇本這裏..仍然沒有運氣。$(文件)。就緒(函數(){VAR = ttline2 $( '#FIELD_' + FieldIDS ['TT_Line2 '])。val; ttline2 = $('#FIELD_'+ FieldIDS ['BadgeHolder'] .val + $('#FIELD_'+ FieldIDS ['strap_clip'] .val + $('#FIELD_'+ FieldIDS ['Lanyard']。val; }); – Cam