我刚刚创建了mvc 4 Application。在该应用程序中,我有一个表单来插入部门。对于那个表单,我正在使用客户端验证。
这些客户端验证在Firefox和Chrome中正常运行,但在IE 9(Internet Explorer)
中没有这是我的模特课
public partial class tbl_hec_Department
{
public tbl_hec_Department()
{
this.tbl_hec_level_of_Study = new HashSet<tbl_hec_level_of_Study>();
this.tbl_hec_Programme = new HashSet<tbl_hec_Programme>();
}
[Required]
[DisplayName("Department ID")]
[Remote("doesDepartment_IDExist", "HEC", HttpMethod = "POST", ErrorMessage = "Department ID already exists.")]
public string Department_ID { get; set; }
[Required]
[DisplayName("Name of Department")]
public string Name_of_Department { get; set; }
[DataType(DataType.PhoneNumber)]
[DisplayName("Telephone Number")]
//[StringLength(50, ErrorMessage = "Please enter a minimum of {2} characters", MinimumLength = 6)]
public string Contact_General_Line { get; set; }
//[StringLength(50, ErrorMessage = "Please enter a minimum of {2} characters", MinimumLength = 6)]
[DisplayName("Fax Number")]
public string Contact_Fax_Number { get; set; }
[Required]
[EmailAddress(ErrorMessage = "Please enter a valid email address")]
[DisplayName("Email Address")]
public string Contact_Email { get; set; }
[Required(ErrorMessage = "Please select the {0}")]
[DisplayName("University / Institute")]
public string HEI_ID { get; set; }
[Required(ErrorMessage = "Please select the {0}")]
[DisplayName("College")]
public string College_ID { get; set; }
[DisplayName("Status")]
public Nullable<bool> Status { get; set; }
public string Create_By { get; set; }
public Nullable<System.DateTime> Create_Date { get; set; }
public string Update_By { get; set; }
public Nullable<System.DateTime> Update_Date { get; set; }
public virtual tbl_hec_College tbl_hec_College { get; set; }
public virtual tbl_hec_University tbl_hec_University { get; set; }
public virtual ICollection<tbl_hec_level_of_Study> tbl_hec_level_of_Study { get; set; }
public virtual ICollection<tbl_hec_Programme> tbl_hec_Programme { get; set; }
}
这些是脚本文件夹中的脚本文件
这就是我在布局文件中呈现脚本文件的方式
@Scripts.Render("~/Scripts/jquery.min.js")
@Scripts.Render("~/Scripts/jquery-migrate-1.2.1.js")
@Scripts.Render("~/Scripts/bootstrap.min.js")
@Scripts.Render("~/Scripts/jquery-ui.min.js")
@Scripts.Render("~/Scripts/raphael-min.js")
@Scripts.Render("~/Scripts/morris.min.js")
@Scripts.Render("~/Scripts/jquery.sparkline.min.js")
@Scripts.Render("~/Scripts/jquery-jvectormap-1.2.2.min.js")
@Scripts.Render("~/Scripts/jquery-jvectormap-world-mill-en.js")
@Scripts.Render("~/Scripts/jquery.knob.js")
@Scripts.Render("~/Scripts/daterangepicker.js")
@Scripts.Render("~/Scripts/bootstrap-datepicker.js")
@Scripts.Render("~/Scripts/bootstrap3-wysihtml5.all.min.js")
@Scripts.Render("~/Scripts/icheck.min.js")
@Scripts.Render("~/Scripts/app.js")
@Scripts.Render("~/Scripts/dashboard.js")
@Scripts.Render("~/Scripts/demo.js")
答案 0 :(得分:0)
我很确定在客户端机器浏览器中禁用java脚本。首先,检查客户端浏览器中是启用还是禁用java脚本。您可以使用此代码以编程方式检查它。
PIVOT
您还可以访问此链接How to check java scxript in client browser enabled or not