|
 |
|
สอบถามครับ เรื่อง java date เราจะเอาค่าใน จาวา ที่ได้มา มาใส่ลงใน text box ได้ยังไงครับ |
|
 |
|
|
 |
 |
|
<!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" xml:lang="en" lang="en">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>
<link rel="stylesheet" type="text/css" media="screen" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/themes/base/jquery-ui.css">
<script type="text/javascript">
$(function() {
var startDate;
var endDate;
var selectCurrentWeek = function() {
window.setTimeout(function () {
$('.week-picker').find('.ui-datepicker-current-day a').addClass('ui-state-active')
}, 1);
}
$('.week-picker').datepicker( {
showOtherMonths: true,
selectOtherMonths: true,
onSelect: function(dateText, inst) {
var date = $(this).datepicker('getDate');
startDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay());
endDate = new Date(date.getFullYear(), date.getMonth(), date.getDate() - date.getDay() + 6);
var dateFormat = inst.settings.dateFormat || $.datepicker._defaults.dateFormat;
$('#startDate').text($.datepicker.formatDate( dateFormat, startDate, inst.settings ));
$('#endDate').text($.datepicker.formatDate( dateFormat, endDate, inst.settings ));
selectCurrentWeek();
},
beforeShowDay: function(date) {
var cssClass = '';
if(date >= startDate && date <= endDate)
cssClass = 'ui-datepicker-current-day';
return [true, cssClass];
},
onChangeMonthYear: function(year, month, inst) {
selectCurrentWeek();
}
});
$('.week-picker .ui-datepicker-calendar tr').live('mousemove', function() { $(this).find('td a').addClass('ui-state-hover'); });
$('.week-picker .ui-datepicker-calendar tr').live('mouseleave', function() { $(this).find('td a').removeClass('ui-state-hover'); });
});
</script>
</head>
<body>
<div class="week-picker"></div>
<br /><br />
<label>Week :</label> <span id="startDate"></span> - <span id="endDate"></span>
<form action="" method="get"><input name="stardDate" id="startDate" type="text" />
-
<input name="endDate" id="endDate" type="text" /></form>
</body>
</html>
ผมต้องการรับค่าที่ได้มา เอามาใส่ใน textbox ครับ
Tag : PHP, MySQL, JavaScript

|
|
 |
 |
 |
 |
Date :
2012-06-26 22:34:27 |
By :
ddsiam |
View :
1209 |
Reply :
4 |
|
 |
 |
 |
 |
|
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
$("#textboxid").append(val);
ไม่รู้ว่าใช่แบบนี้หรือเปล่าครับ?
|
 |
 |
 |
 |
Date :
2012-06-26 23:05:06 |
By :
Manussawin |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
Document.getElementByID('ไอดี textbox').value = 'ค่าที่ต้องการใส่'
ลองดูครับ
|
 |
 |
 |
 |
Date :
2012-06-26 23:16:41 |
By :
่joesimikung |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
,มันมาล่ะครับ แต่มาทั้ง ยวงเลยอะครับ
Sat Jun 23 2012 00:00:00 GMT+0700 (SE Asia Standard Time) <<<น่คือค่าที่ได้มาครับ
|
 |
 |
 |
 |
Date :
2012-06-26 23:52:22 |
By :
ddsiam |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 01
|