You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.6 KiB
77 lines
2.6 KiB
|
|
/********************************************
|
|
* 函數名稱:
|
|
* 目的:讀取畫面時執行
|
|
* 作者:Gary
|
|
* 時間:2014/03/21
|
|
* 參數說明:
|
|
btnLogin:先把type由submit轉button避免觸發cs之onclick事件
|
|
intTime :避免IE無限迴圈
|
|
*********************************************/
|
|
//$(document).ready(function () {
|
|
// $('#btnLogin').attr('type', 'button');
|
|
// //$('#divbtnLogin').html($('#divbtnLogin').html().replace("type=\"submit\"", "type=\"button\""));
|
|
//})
|
|
var intTime = 1;
|
|
/********************************************
|
|
* 函數名稱:
|
|
* 目的:讓DIV晃動
|
|
* 作者:Gary
|
|
* 時間:2014/03/21
|
|
* 參數說明:
|
|
*********************************************/
|
|
function shake() {
|
|
var position = $('#login-mind').offset();
|
|
var x = position.left;
|
|
var y = position.top;
|
|
if (!$('#login-mind').is(":animated")) { //判斷是否執行中
|
|
$('#login-mind').animate({ left: -8 }, 210).animate({ left: 0 }, 180) //往上6px,再返回
|
|
.animate({ left: -4 }, 150).animate({ left: 0 }, 130) //往上3px,再返回
|
|
.animate({ left: -2 }, 100).animate({ left: 0 }, 80); //往上1px,再返回
|
|
}
|
|
}
|
|
/********************************************
|
|
* 函數名稱:
|
|
* 目的:點選Txt時清除文字
|
|
* 作者:Gary
|
|
* 時間:2014/03/21
|
|
* 參數說明:
|
|
*********************************************/
|
|
function Cleantxt(string) {
|
|
document.getElementById(string).value = "";
|
|
}
|
|
/********************************************
|
|
* 函數名稱:
|
|
* 目的:登入驗證使用WebService
|
|
* 作者:Gary
|
|
* 時間:2014/03/21
|
|
* 參數說明:
|
|
strWSLocation : WebService路徑
|
|
*********************************************/
|
|
function jqlogin() {
|
|
var strUserId = $('#txtUserId').val();
|
|
var strPwd = $('#txtPwd').val();
|
|
var msg = '';
|
|
var strURL = strWSLocation + 'LoginVerification'; //設定WebService路徑
|
|
if (strUserId != '' && strPwd != '') {
|
|
$.ajax({
|
|
type: 'Post',
|
|
url: strURL,
|
|
dataType: 'xml',
|
|
data: { strUserId: strUserId, strPwd: strPwd },
|
|
success: function (oXml) {
|
|
msg = $('string', oXml).text();
|
|
if (msg == 'ok') {
|
|
$('#btnWebService').click();
|
|
}
|
|
else {
|
|
ShowArtAlert(msg);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
else {
|
|
msg = (strUserId == "" && strPwd == "") ? "A00065" : (strUserId == "" && strPwd != "") ? "A00066" : "A00067";
|
|
ShowArtAlert(msg);
|
|
}
|
|
}
|