我試圖在表單上爲用戶提交他們的生日創建字段,但從未出現月份,日期和年份的下拉列表。所以我只需在表單的一個下拉菜單中輸入月份和日期。如何在表單提交時正確創建並生成生日字段?
如何使用html創建三個填寫表單(月,日期,年)的生日信息的字段。
當用戶使用javascript提交他們的應用程序時,我該如何顯示它?
<script type='text/javascript'>
var form_script = {
form_id: $('#generic_form'),
status_id: $('#send_form'),
specific_id: $('#form_spec'),
enable_guests: false,
pm: {
enabled: false, // Does not work for guests
user: "", // 1 user only
title: "New acceptance test From {{user_name}}",
content: "{{form}}"
},
topic: {
enabled: true,
forum_id:3240482, // 1 id only
title: "About Me",
description: "Biography",
content: "{{form}}"
},
statuses: {
not_logged_in: "Error! You must be logged in to make an introduction topic.", // Used if enable_guests: false
first: "Verifying...",
second: "Processing...",
done: "Your introduction topic has been posted. You may customize your topic and edit the title."
},
submission_formatting: {
separator: ' ',
before_all: '',
after_all: '',
before_question: '[b]',
after_question: '[/b]',
before_response: '[i]',
after_response: '[/i]'
},
possible_elements: 'input, textarea, select' // For the second column of table; .val() must work on it
};
</script>
<form id='generic_form'>
<div class='category'>
<table class='cat_head'>
<tr>
<td><h2 style='text-align:center'>Introduce Yourself</h2></td>
</tr>
</table>
</div>
<table>
<tr>
<td> </td>
</tr>
</table>
<table id='form_spec'>
<tr>
<th colspan='2'><h2>Please completely fill out all the requested information below with honesty:</h2></th>
</tr>
<tr>
<td>Name:</td>
<td><input type='text' /></td>
</tr>
<tr>
<td>Nickname:</td>
<td><input type='text' /></td>
</tr>
<tr>
<td>Gender:</td>
<td>
<select>
<option>Male</option>
<option>Female</option>
<option>Unknown</option>
</select>
</td>
</tr>
<tr><td>Birthday:</td>
<td>
<select>
<option>N/A</option>
<option>January 1st</option>
<option>February 1st</option>
<option>March 1st</option>
<option>April 1st</option>
<option>May 1st</option>
<option>June 1st</option>
<option>July 1st</option>
<option>August 1st</option>
<option>September 1st</option>
<option>October 1st</option>
<option>November 1st</option>
<option>December 1st</option>
</select>
</td>
</tr>
<tr>
<td colspan='2' id='send_form'><button type='submit'>Submit</button></td>
</tr>
</table>
</form>
你的問題不清楚。你想要達到什麼目的? –
你的代碼中有語法錯誤,這可能是爲什麼這兩個字段沒有正確顯示。要添加額外的下拉菜單,您只需創建相關的'