- 注册时间
- 2018-5-2
- 最后登录
- 1970-1-1
- 阅读权限
- 10
- 积分
- 190
- 精华
- 0
- 帖子
- 0
|
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>系统登录</title>
<link href="scripts/miniui/themes/default/miniui.css" rel="stylesheet" type="text/css" />
<script src="scripts/boot.js" type="text/javascript"></script>
<script src="scripts/jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="jquery-cookie/jquery.cookie.js" type="text/javascript"></script>
<script src="scripts/miniui/miniui.js" type="text/javascript"></script>
</head>
<body>
<form id="form2" runat="server">
<div id="form1" >
<table>
<tr>
<td><label for="username$text">用户名:</label></td>
<td>
<input name="username" id="username" type="text" class="mini-textbox" required="true" emptyText="请输入用户名!" />
</td>
</tr>
<tr>
<td><label for="pwd$text">密码:</label></td>
<td>
<input name="pwd" id="pwd" class="mini-password" required="true" emptyText="请输入密码!" />
</td>
</tr>
<tr>
<td></td>
<td>
<input value="登录" type="button" />
</td>
</tr>
</table>
</div>
<script type="text/javascript">
function showErrorTexts(errorTexts) {
var s = errorTexts.join('<br/>');
var win = window.open('', "", 'height=200,width=400,top=200,left=400,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no, titlebar=no');
win.document.open('text/html', 'replace');
win.document.write(s);
win.document.close();
}
function submitForm() {
var form = new mini.Form("#form1");
form.validate();
if (form.isValid() == false) {
var errorTexts = form.getErrorTexts();
showErrorTexts(errorTexts);
return;
}
//window.location.replace("http://www.baidu.com");
//提交数据
var data = form.getData();
var json = mini.encode(data);
alert("提交成功");
}
function submitForm1() {
response.sendRedirect("http://www.baidu.com");
alert("提交成功");
}
function submitlogin() {
var txt_username = document.getElementById("username").value;
var txt_pwd = document.getElementById("pwd").value;
// var msgid = mini.loading("数据查询中,请稍后......");
// window.location.replace("http://www.baidu.com");
var str = '<%=GetStr()%>';
alert(str);
}
function setCookie(cname, cvalue, exdays) {
$.cookie(cname, cvalue, { path: '/', expires: 3 });
}
function submitlogin1() {
// debugger
// window.location.replace("http://www.baidu.com");
var txt_username = mini.get("username").getValue();
var txt_pwd = mini.get("pwd").getValue();
//mini.parse;
$.ajax({
//url: "TreeService.aspx?method=jumptomain",
url: "TreeService.aspx?method=jumptomain",
data: { id: txt_username, pass: txt_pwd },
type: "post",
success: function (text) {
// alert(text);
// document.getElementById("pwd").value = text;
if (text == "SUCCEED") {
setCookie("CGTLXXXT_ID", txt_username, 1);
setCookie("CGTLXXXT_PASS", txt_pwd, 1);
$(location).attr('href', 'mainWeb/MainWeb.aspx');
// window.location.href = "mainWeb/MainWeb.aspx";
}
else {
alert("用户名或密码错误!");
// alert(text);
}
// var data = mini.decode(text);
},
error: function (jqXHR, textStatus, errorThrown) {
alert(jqXHR.responseText);
}
});
}
function jumptomain() {
var txt_username = mini.get("username").getValue();
var txt_pwd = mini.get("pwd").getValue();
//mini.parse;
$.ajax({
//url: "TreeService.aspx?method=jumptomain",
url: "mainWeb/MainWeb.aspx",
onload: function () {
var iframe = this.getIFrameEl();
var data = { id: txt_username, pass: txt_pwd };
iframe.contentWindow.SetData(data);
},
ondestroy: function (action) {
//var iframe = this.getIFrameEl();
grid.reload();
}
});
}
</script>
</form>
</body>
</html>
调试时有的360浏览器能正常登陆,有的确不行,不知道是为什么。在故障状态下F12调试
提示行: 11
错误: 'mini' 为空或不是对象
不知道是什么原因!在故障状态下IE8也不行,可是FIREFOX浏览器确可以,请问这个是什么原因?
|
|