0
我有一個奇怪的問題&一個.ASPX頁面上的某些表單元素的奇怪問題正在處理..頁面窗體有一個隱藏的幻燈片點擊一個div,節允許用戶「預約」。魔法代碼? - .aspx字段丟失並從源代碼消失
用於爲幻燈片設置動畫效果的jQuery工作正常,並且在點擊ticky複選框(id =「rescheck」)時發生。
問題是,隱藏div顯示的所有字段都顯示在單擊複選框上,因此與標籤一起滑入視圖中,只顯示一個文本字段輸入,而沒有其他內容。檢查源代碼顯示,這些殘缺的標籤&領域甚至沒有在源代碼中,dispite在頁面代碼是微軟的Visual Studio 2008中
內查看時(或修改)正如你所看到的,領域而他們的標籤似乎只是在瀏覽器中消失!我不知道是什麼造成這種情況,我不確定下一步該怎麼辦。
這是我的網頁代碼,從Visual Studio:
<fieldset id="resreq">
<legend>Make a Reservation?</legend>
<label for="rescheck" class="rescheck">If you would like to reserve a table at Madrasi check here:</label>
<input id="rescheck" type="checkbox" class="rescheck" runat="server" />
<div id="reservationfields">
<div id="res_when">
<div>
<asp:Label ID="lblDate" runat="server" AssociatedControlID="txtDate">On which date would you like us to reserve your table?</asp:Label>
<asp:TextBox ID="txtDate" runat="server" CssClass="res_date" />
</div>
<div>
<asp:Label ID="lblTime" runat="server">and for what time?</asp:Label>
<asp:TextBox ID="txtTime" runat="server" CssClass="res_time" />
</div>
</div><!-- close res_when -->
<div>
<asp:Label ID="lblBranch" runat="server">At which restaurant would you like to make your reservation?</asp:Label>
<asp:DropDownList ID="ddlBranch" runat="server">
<asp:ListItem Text="Select a Restaurant" Value="" />
<asp:ListItem Text="Restaurant 1" Value="Restaurant 1" />
<asp:ListItem Text="Restaurant 2" Value="Restaurant 2" />
</asp:DropDownList>
</div>
<div>
<asp:Label ID="lblPeople" runat="server" AssociatedControlID="txtPeople" Text="Number of Guests:" />
<asp:TextBox ID="txtPeople" runat="server" />
</div>
<div>
<asp:Label ID="lblDOB" runat="server" AssociatedControlID="txtDOB">Date of Birth:</asp:Label>
<asp:TextBox ID="txtDOB" runat="server" />
</div>
</div><!-- close reservation fields -->
</fieldset>
...這是源代碼,當你在瀏覽器中 '查看源文件':
<fieldset id="resreq">
<legend>Make a Reservation?</legend>
<label for="rescheck" class="rescheck">If you would like to reserve a table at Madrasi check here:</label>
<input name="ctl00$cpcMain$rescheck" type="checkbox" id="ctl00_cpcMain_rescheck" class="rescheck" />
<div id="reservationfields">
<div id="res_when">
<div>
<input name="ctl00$cpcMain$txtDate" type="text" id="ctl00_cpcMain_txtDate" class="res_date" />
</div>
<div>
</div>
</div>
<div>
</div>
<div>
</div>
<div>
<span id="ctl00_cpcMain_rvDOB" style="color:Red;visibility:hidden;">You have entered your Date of Birth incorrectly (dd/mm/yyyy).</span>
</div>
</div><!-- close reservation fields -->
</fieldset>
我有這個@文檔的結尾:(我也嘗試刪除下面這個腳本片段,但它沒有區別) – Phil 2010-10-27 11:57:03
– Phil 2010-10-27 11:57:47