0
我需要讓我的應用程序在ie6中工作。 我發現默認的登錄頁面不起作用。 白色的登錄部分位於標題的右側,更重要的是,我無法在文本框中輸入任何內容。我該如何解決?默認ASP.NET MVC 2網頁不能在IE6中工作
<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ITOC.WebUI.Models.LogOnModel>" %>
<asp:Content ID="loginTitle" ContentPlaceHolderID="TitleContent" runat="server">
Log On
</asp:Content>
<asp:Content ID="loginContent" ContentPlaceHolderID="MainContent" runat="server">
<h2>Log On</h2>
<p>
Please enter your username and password.
</p>
<% using (Html.BeginForm()) { %>
<%: Html.ValidationSummary(true, "Login was unsuccessful. Please correct the errors and try again.") %>
<div>
<fieldset>
<legend>Account Information</legend>
<div class="editor-label">
<%: Html.LabelFor(m => m.UserName) %>
</div>
<div class="editor-field">
<%: Html.TextBoxFor(m => m.UserName) %>
<%: Html.ValidationMessageFor(m => m.UserName) %>
</div>
<div class="editor-label">
<%: Html.LabelFor(m => m.Password) %>
</div>
<div class="editor-field">
<%: Html.PasswordFor(m => m.Password) %>
<%: Html.ValidationMessageFor(m => m.Password) %>
</div>
<div class="editor-label">
<%: Html.CheckBoxFor(m => m.RememberMe) %>
<%: Html.LabelFor(m => m.RememberMe) %>
</div>
<p>
<input type="submit" value="Log On" />
</p>
</fieldset>
</div>
<% } %>
</asp:Content>
在頁面源代碼中轉換爲此;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
Log On
</title><link href="../Content/Site.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.4.1.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.js" type="text/javascript" language="javascript"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/overcast/jquery-ui.css" type="text/css" rel="Stylesheet" class="ui-theme" />
<script type="text/javascript">
$(function() {
$(".datePicker").datepicker({ showOn: 'both', dateFormat: 'dd/mm/yy' });
});
// $(function() {
// jQuery.validator.addMethod("mustexistproperty", function (value, element, params) {
// if (this.optional(element)) {
// return true;
// }
// var otherPropertyControl = $("#" + params.otherProperty);
// if (otherPropertyControl == null) {
// return false;
// }
// var otherPropertyValue = otherPropertyControl[0].value;
// return (otherPropertyValue.length + value.length > 0);
// });
// });
</script>
</head>
<body>
<div class="page">
<div id="header">
<div id="title">
<h1>Instruction To Open Contract (ITOC)</h1>
</div>
<div id="logindisplay">
[ <a href="/">Log On</a> ]
</div>
<div id="menucontainer">
</div>
</div>
<div id="main">
<h2>Log On</h2>
<p>
Please enter your username and password.
</p>
<form action="/Account/LogOn?ReturnUrl=%2fContract%2fDetails%2f3" method="post">
<div>
<fieldset>
<legend>Account Information</legend>
<div class="editor-label">
<label for="UserName">User name</label>
</div>
<div class="editor-field">
<input id="UserName" name="UserName" type="text" value="" />
</div>
<div class="editor-label">
<label for="Password">Password</label>
</div>
<div class="editor-field">
<input id="Password" name="Password" type="password" />
</div>
<div class="editor-label">
<input id="RememberMe" name="RememberMe" type="checkbox" value="true" /><input name="RememberMe" type="hidden" value="false" />
<label for="RememberMe">Remember me?</label>
</div>
<p>
<input type="submit" value="Log On" />
</p>
</fieldset>
</div>
</form>
<div id="footer">
</div>
</div>
</div>
</body>
</html>
該網站是否可以在其他瀏覽器中使用? IE8,FireFox? – Niike2 2010-08-18 11:14:25
這是**不是默認頁面。你已經包含了自定義腳本和CSS。也許他們正在造成這種行爲。 – 2010-08-18 11:15:10
當你使用Firefox時,螢火蟲會抱怨任何錯誤嗎? – 2010-08-18 11:15:28