|
|
|
เมื่อกดปุ่มตกลงแล้วในขณะที่ยังไม่ได้กรอกข้อมูล(ค่าว่าง)ใน IE8 ไม่มีalertขึ้นมาครับแต่ในIE9ได้ |
|
|
|
|
|
|
|
Code (PHP)
<!DOCTYPE HTML>
<html dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Forte Layer To Excel Downloader 2.0</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<link rel="stylesheet" href="msgBoxLight.css" type="text/css">
<link rel="stylesheet" href="css/smoothness/jquery-ui-1.8.23.custom.css" type="text/css" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.23.custom.min.js"></script>
<script type="text/javascript" src="jquery.msgBox.js"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$( "#username" ).datepicker({
changeMonth: true,
onSelect: function( selectedDate ) {
$( "#password" ).datepicker( "option", "minDate", selectedDate );
}, dateFormat: 'dd-M-yy', maxDate: 0
});
$( "#password" ).datepicker({
changeMonth: true,
onSelect: function( selectedDate ) {
$( "#username" ).datepicker( "option", "maxDate", selectedDate );
}, dateFormat: 'dd-M-yy', maxDate: 0
});
$("#txtLine").hide();
$("#remember-me").click(function() {
if($('#remember-me:checked').length) {
$("#txtLine").show();
} else {
$("#txtLine").hide();
}
});
})
function chkRangeOfDate(){
var one_day=1000*60*60*24;
str1 = document.frmExcel.username.value;
str2 = document.frmExcel.password.value;
fdate = new Date(Date.parse(str1.replace(/-/g, " "))) ;
tdate = new Date(Date.parse(str2.replace(/-/g, " "))) ;
totaldate = ((tdate.getTime() - fdate.getTime()) / one_day)+1;
if ((document.frmExcel.username.value == "") || (document.frmExcel.password.value == ""))
{
$.msgBox({
title: "notification",
content: "Please choose export date!!",
type: "info",
showButtons: false,
opacity: 0.9,
autoClose:true
});
} else {
if ( totaldate >= 32)
{
$.msgBox({
title: "notification",
content: "Do not exceed one month.!!",
type: "alert",
showButtons: false,
opacity: 0.9,
autoClose:true })
} else {
alert( "OK!!! ...Pass " + totaldate);
}
}
}
</script>
</head>
<body>
<div id="container">
<form name="frmExcel" id="frmExcel" action="welcome.html">
<div class="login">Export forte layer to Excel.</div>
<div class="username-text">From Date:</div>
<div class="password-text">To Date:</div>
<div class="username-field">
<input type="text" name="username" id="username" />
</div>
<div class="password-field">
<input type="text" name="password" id="password" />
</div>
<input type="checkbox" name="remember-me" id="remember-me" /><label for="remember-me">Line </label>
<div class="forgot-usr-pwd"><label for="txtLine"></label>
<select name="txtLine" id="txtLine">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</select></div>
<input onclick="chkRangeOfDate()" type="button" name="submit" value="" />
</form>
</div>
<div id="footer">
Please choose range of date for download data.
</div>
</body>
</html>
Tag : PHP, HTML/CSS, JavaScript, jQuery
|
|
|
|
|
|
Date :
2012-09-17 16:23:44 |
By :
kung59287 |
View :
1249 |
Reply :
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ยังไม่ได้เลยครับ
|
|
|
|
|
Date :
2012-09-18 15:45:24 |
By :
kung59287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ช่วยหน่อยครับ
|
|
|
|
|
Date :
2012-09-19 16:02:21 |
By :
kung59287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|