ถามเกี่ยวกับjavascriptหน่อยค่ะ คือว่าหนูทำระบบส่งเกรดแล้วจะต้องมีการเก็บคะแนนเด็กลงฐานข้อมูล
ใช้ javascript ตรวจสอบนะครับ
Code (PHP)
<script>
function numtext(value)
{
if(value>70)//value เกิน 70 หรือป่าว
{
document.getElementById("aax").value="";//ทำให้ช่อง text กลายเป็นค่าว่าง อ้างจาก ID text ครับ จะเห็นว่าผมกำหนด ID ว่า aa
alert("เกิน 70");//แจ้งเตือน
}
}
</script>
<input name="aa" id="aax" type="text" onkeyup="numtext(this.value)"/>
ลองดูนะครับ สงสัยตรงไหนถามได้ครับ
Date :
2010-04-27 15:04:46
By :
kaos
Code (PHP)
<script type="text/javascript">
function chkvalue(value){
var grade = value.value;
if (grade > 70) {
alert("เกินแล้วจ้า");
value.value = "";
value.focus();
}
}
</script>
<input type="text" name="txt" id="txt" onkeyup="chkvalue(this);" />
ไม่ได้กันตัวอักษร
Date :
2010-04-27 15:07:42
By :
ไวยวิทย์
Code (PHP)
<script type="text/javascript">
function chkvalue(value){
var grade = value.value;
if (grade.charAt(grade-1).search(/[0-9]/) == -1)
{
alert("aaa");
value.value = "";
value.focus();
}
if (grade > 70) {
alert("เกินแล้วจ้า");
value.value = "";
value.focus();
}
}
</script>
- - เฉพาะตัวเลขนะครับ
Date :
2010-04-27 15:32:55
By :
kaos
ขอบคุณพี่ๆ ค่ะ ได้แล้วแต่ได้แค่ช่องเดียว อีกช่องยังไม่ได้ค่ะ ช่วยดูหน่อยค่ะ
Date :
2010-04-27 16:13:10
By :
saowaluk052
onkeyup="chkvalue(this);" ก็ใส่ไว้ทุก ช่องสิ - -"
Date :
2010-04-27 16:15:13
By :
kaos
คือใส่แล้วแต่ช่องแรกต้องการกรอกได้ไม่เกิน 70 แต่อีกช่องต้องการกรอกได้ไม่เกิน 30 ค่ะ
Date :
2010-04-27 16:18:51
By :
saowaluk052
Date :
2010-04-27 16:19:17
By :
ไวยวิทย์
Date :
2010-04-27 16:41:40
By :
saowaluk052
อ่านะ ก็ทำไม่ให้เกิน 30 สิครับ - -ยากตรงไหน
Date :
2010-04-27 16:46:20
By :
kaos
หนูลองทำแบบนี้แล้วค่ะ แต่มันก็ยังไม่ได้ช่วยแก้ให้หน่อยค่ะ
<script type="text/javascript">
function chkvalue(value){
var grade = value.value;
if (grade > 70) {
alert("เกิน70แล้วจ้า");
value.value = "";
value.focus();
}
else if (grade > 30) {
alert("เกิน30 จ้า");
value.value = "";
value.focus();
}
}
</script>
Date :
2010-04-27 16:52:19
By :
saowaluk052
แล้วต้องเขียนยังไงอะค่ะ คิดไม่ออก ช่วยหน่อยนะค่ะ พี่หนูจำเป็นจริงๆค่ะพอดีหนูไม่ค่อยถนัดjavascript ค่ะ
Date :
2010-04-27 17:01:29
By :
saowaluk052
แง๋ว สร้างใหม่สิครับ ถ้าไม่สร้างใหม่ก็ส่งค่าบอก ว่าเอาเข้าเงื่อนไขไหน
Date :
2010-04-27 17:02:34
By :
kaos
ยังไงค่ะ ไม่เข้าใจค่ะ
Date :
2010-04-27 17:06:27
By :
saowaluk052
สร้าง ฟังก์ชั่นขึ้นมาใหม่อีกอันอะครับ
หรือ
ส่งค่าเพิ่มไปอีกตัวเพื่อที่จะตรวจสอบได้ว่า จะใช้ >70 หรือ >30
Date :
2010-04-27 17:09:41
By :
kaos
หนูทำได้แล้วค่ะ แต่ว่าคะแนนจะไม่รวมให้อัตโนมัติค่ะ ปกติตอนที่ยังไม่ใส่ javascript กำหนดการกรอกคะแนนมันก็รวมให้ปกติค่ะ แต่พอใส่แล้วไม่รวมค่ะ ไม่รู้เป็นอะไรช่วยดูโค๊ดให้หน่อยค่ะไม่รู้เกี่ยวกันมั้ยที่หนูใช้ onkeyupซ้ำกันค่ะ
Code (PHP)
<?php
session_start();
include"connect.php";
$id_teacher=$_SESSION["user_id1"];
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>ระบบการจัดการสนเทศโรงเรียนนาโยงวิทยาคม </title>
<style type="text/css">
<!--
.style12 {
color: #FF6633;
font-weight: bold;
}
.style22 {color: #0000FF; }
.style23 {color: #000000; }
.style1 { color: #FFFFFF;
font-weight: bold;
}
.style30 {font-family: Tahoma, "MS Sans Serif"}
.style44 {color: #FF0000;
font-weight: bold;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<body onload="MM_preloadImages('image/041.JPG','image/031.JPG','image/021.JPG','image/051.JPG','image/081.JPG','image/011.JPG','image/ghf.JPG','image/YY1.JPG','image/sd1.JPG','image/11.JPG','image/home1.JPG','image/ma.JPG','image/chang.JPG','image/out.JPG','image/166.JPG','image/231.JPG','image/re1.JPG')">
<table width="824" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999">
<!--DWLayoutTable-->
<tr>
<td height="192" colspan="2" valign="top" bgcolor="#FFFFFF"><img src="image/122.jpg.JPG" width="825" height="182" /></td>
</tr>
<tr>
<td height="53" colspan="2" valign="top" background="image/y1.jpg"><table width="818" border="0" align="left">
<tr>
<td width="121" align="center" valign="top"><a href="home.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','image/YY1.JPG',1)"><img src="image/YY.JPG" name="Image3" width="121" height="38" border="0" id="Image3" /></a><a href="index.php"></a></td>
<td width="123"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image20','','image/231.JPG',1)"><img src="image/232.JPG" name="Image20" width="124" height="43" border="0" id="Image20" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','image/sd1.JPG',1)"></a></td>
<td width="153"><a href="index.php" onclick='return Conf(this)'onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image19','','image/166.JPG',1)"><img src="image/1661.JPG" name="Image19" width="165" height="41" border="0" id="Image19" /></a><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image121','','image/11.JPG',1)"></a></td>
<td><div align="right"><span class="style22">ยินดีต้อนรับ</span> <span class="style22">คุณ</span>
<?=$_SESSION[user_name1].' '.$_SESSION[surname1];?>
</div></td>
</tr>
</table> </tr>
<tr>
<td width="213" height="399" valign="top"><table width="156" height="304" border="0">
<tr>
<td width="150" height="36" background="image/8.JPG"><div align="center" class="style12"><img src="image/uyk.JPG" width="206" height="44" /></div></td>
</tr>
<tr>
<td height="31" background="image/9.JPG"><span class="style12"><a href="home.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image17','','image/home1.JPG',1)"><img src="image/home.JPG" name="Image17" width="206" height="45" border="0" id="Image17" /></a><a href="home.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','image/041.JPG',1)"></a><a href="home1.php"></a></span></td>
</tr>
<tr>
<td height="31" background="image/9.JPG"><a href="edittecher.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image18','','image/ma.JPG',1)"><img src="image/ma1.JPG" name="Image18" width="206" height="45" border="0" id="Image18" /></a><a href="edittecher.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','image/031.JPG',1)"></a><a href="edittecher111.php"></a></td>
</tr>
<tr>
<td height="31" background="image/9.JPG"><a href="sendgade2.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image16','','image/ghf.JPG',1)"><img src="image/gh.JPG" name="Image16" width="205" height="45" border="0" id="Image16" /></a><a href="sendgade.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','image/021.JPG',1)"></a></td>
</tr>
<tr>
<td height="31" background="image/9.JPG"><a href="gade1.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','image/051.JPG',1)"><img src="image/05.JPG" name="Image12" width="206" height="44" border="0" id="Image12" /></a></td>
</tr>
<tr>
<td height="31"><a href="changeteacher.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','image/chang.JPG',1)"><img src="image/chang1.JPG" name="Image13" width="206" height="45" border="0" id="Image13" /></a></td>
</tr>
<tr>
<td height="31" background="image/8.JPG"><a href="serchdata.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image14','','image/081.JPG',1)"><img src="image/08.JPG" name="Image14" width="206" height="45" border="0" id="Image14" /></a><a href="serchdata.php"></a></td>
</tr>
<tr>
<td height="31" background="image/8.JPG"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image21','','image/re1.JPG',1)"><img src="image/re.JPG" name="Image21" width="206" height="44" border="0" id="Image21" /></a></td>
<tr>
<td height="31" background="image/8.JPG"><div align="center"><a href="index.php"></a><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','image/011.JPG',1)"></a><a href="index.php"></a><a href="index.php" onclick='return Conf(this)' onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image15','','image/out.JPG',1)"><img src="image/out1.JPG" name="Image15" width="206" height="45" border="0" id="Image15" /></a></div></td>
<SCRIPT language="JavaScript">
function Conf(object) {
if (confirm("คุณต้องการออกจากระบบหรือไม่ ?") == true) {
return true;
}
return false;
}
</SCRIPT>
</table></td>
<SCRIPT language=JavaScript>
function check_number() {
e_k=event.keyCode
//if (((e_k < 48) || (e_k > 57)) && e_k != 46 ) {
if (e_k != 13 && (e_k < 48) || (e_k > 57)) {
event.returnValue = false;
alert("กรุณาใส่ตัวเลขค่ะ");
}
}
</script>
<script language="javascript">
function sum(){
for ($a=0; $a<=200 ;$a++){
document.form1.txtSum.value=parseInt(document.form1.txtMid.value)+parseInt(document.form1.txtFinal.value);
if ((!document.form1.txtMid.value)||(!document.form1.txtFinal.value))
{
document.form1.txtSum.value='-';
document.form1.txtGrade.value='-';
}
else if ((document.form1.txtSum.value>=80)&&(document.form1.txtSum.value<=100))
{
document.form1.txtGrade.value='4';
}
else if ((document.form1.txtSum.value>=75)&&(document.form1.txtSum.value<=79))
{
document.form1.txtGrade.value='3.5';
}
else if ((document.form1.txtSum.value>=70)&&(document.form1.txtSum.value<=74))
{
document.form1.txtGrade.value='3';
}
else if ((document.form1.txtSum.value>=65)&&(document.form1.txtSum.value<=69))
{
document.form1.txtGrade.value='2.5';
}
else if ((document.form1.txtSum.value>=60)&&(document.form1.txtSum.value<=64))
{
document.form1.txtGrade.value='2';
}
else if ((document.form1.txtSum.value>=55)&&(document.form1.txtSum.value<=59))
{
document.form1.txtGrade.value='1.5';
}
else if ((document.form1.txtSum.value>=50)&&(document.form1.txtSum.value<=54))
{
document.form1.txtGrade.value='1';
}
else if (document.form1.txtSum.value<=49)
{
document.form1.txtGrade.value='0';
}
document.form1.txtSum[$a].value=parseInt(document.form1.txtMid[$a].value)+parseInt(document.form1.txtFinal[$a].value);
if ((!document.form1.txtMid[$a].value)||(!document.form1.txtFinal[$a].value))
{
document.form1.txtSum[$a].value='-';
document.form1.txtGrade[$a].value='-';
}
else if ((document.form1.txtSum[$a].value>=80)&&(document.form1.txtSum[$a].value<=100))
{
document.form1.txtGrade[$a].value='4';
}
else if ((document.form1.txtSum[$a].value>=75)&&(document.form1.txtSum[$a].value<=79))
{
document.form1.txtGrade[$a].value='3.5';
}
else if ((document.form1.txtSum[$a].value>=70)&&(document.form1.txtSum[$a].value<=74))
{
document.form1.txtGrade[$a].value='3';
}
else if ((document.form1.txtSum[$a].value>=65)&&(document.form1.txtSum[$a].value<=69))
{
document.form1.txtGrade[$a].value='2.5';
}
else if ((document.form1.txtSum[$a].value>=60)&&(document.form1.txtSum[$a].value<=64))
{
document.form1.txtGrade[$a].value='2';
}
else if ((document.form1.txtSum[$a].value>=55)&&(document.form1.txtSum[$a].value<=59))
{
document.form1.txtGrade[$a].value='1.5';
}
else if ((document.form1.txtSum[$a].value>=50)&&(document.form1.txtSum[$a].value<=54))
{
document.form1.txtGrade[$a].value='1';
}
else if (document.form1.txtSum[$a].value<=49)
{
document.form1.txtGrade[$a].value='0';
}
}
}
</script>
<script type="text/javascript">
function chkvalue(value){
var grade1 = value.value;
if (grade1 > 30) {
alert("เกินแล้ว30จ้า");
value.value = "";
value.focus();
}
}
</script>
<script type="text/javascript">
function chk(value){
var grade = value.value;
if (grade > 70) {
alert("เกิน 70แล้วจ้า");
value.value = "";
value.focus();
}
}
</script>
<?
$sqlsel="SELECT * FROM score";
$result1=mysql_query($sqlsel)or die(mysql_error());
$data=mysql_fetch_array($result1);
?>
<td width="605" valign="top" bgcolor="#FFFFFF"><form id="form1" name="form1" method="post" action="sendgadesub.php">
<table width="607" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#FF9900" bgcolor="#336699">
<tr>
<td width="241"><div align="center"><font color="#FFFFFF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><strong>รายวิชา <? echo $id_subject ;?></strong></font></div></td>
<td width="363"><div align="center" class="style1"><font size="3" face="MS Sans Serif, Tahoma, sans-serif">ช่วงคะแนน</font></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td bgcolor="#FFF0FF"><div align="center">ภาคเรียนที่<font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif">/ <font color="#000000"> </font><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"> <font color="#000000"> <br />
จำนวนนักศึกษา </font><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#000000">
<?= $Num_Rows;?>
</font></font></font><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#000000">คน </font></font></font></font></font></div></td>
<td valign="top" bgcolor="#FFF0FF"><table width="367" border="0" align="center" cellpadding="0" cellspacing="1" bordercolor="#666666" bgcolor="#666666">
<tr bgcolor="#FFFFFF">
<td width="29"><div align="left"><span class="style44"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">4</font></span></div></td>
<td width="125"><div align="center"><strong><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"> <?=$data[Begin1];?> - <?=$data[End1];?></font></font></font></strong></div></td>
<td width="31"><div align="left"><span class="style44"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">2</font></span></div></td>
<td width="177"><div align="center"><strong><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><?=$data[Begin5];?> - <?=$data[End5];?></font></font></font></strong></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="left"><span class="style44"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">3.5</font></span></div></td>
<td><div align="center"><strong><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><?=$data[Begin2];?> - <?=$data[End2];?></font></font></font></strong></div></td>
<td><div align="left"><span class="style44"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">1.5</font></span></div></td>
<td><div align="center"><strong><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><?=$data[Begin6];?> - <?=$data[End6];?></font></font></font></strong></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="left"><span class="style44"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">3</font></span></div></td>
<td><div align="center"><strong><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><?=$data[Begin3];?> - <?=$data[End3];?></font></font></font></strong></div></td>
<td><div align="left"><span class="style44"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">1</font></span></div></td>
<td><div align="center"><strong><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><?=$data[Begin7];?> - <?=$data[End7];?></font></font></font></strong></div></td>
</tr>
<tr bgcolor="#FFFFFF">
<td><div align="left"><span class="style44"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">2.5</font></span></div></td>
<td><div align="center"><strong><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><?=$data[Begin4];?> - <?=$data[End4];?></font></font></font></strong></div></td>
<td><div align="left"><span class="style44"><font size="2" face="MS Sans Serif, Tahoma, sans-serif">0</font></span></div></td>
<td><div align="center"><strong><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><font color="#0000FF" size="3" face="MS Sans Serif, Tahoma, sans-serif"><?=$data[Begin8];?> - <?=$data[End8];?></font></font></font></strong></div></td>
</tr>
</table></td>
</tr>
</table>
<table width="605" border="1" align="center" cellpadding="2" cellspacing="2">
<tr bgcolor="#333333">
<td height="30" colspan="7"><div align="center" class="style1">แสดงรายชื่อนักเรียน</div></td>
</tr>
<tr>
<td width="40" height="30"><div align="center">ลำดับ</div></td>
<td width="46"><div align="center">รหัส</div></td>
<td width="202"><div align="center">ชื่อ-สกุล</div></td>
<td width="80"><div align="center">คะแนนสอบ<br />
กลางภาค</div></td>
<td width="85"><div align="center">คะแนนสอบ<br />
ปลายภาค</div></td>
<td width="60"><div align="center">รวม</div></td>
<td width="32"><div align="center">เกรด</div></td>
</tr>
<?php
////////////// แสดงข้อมูลรายวิชาที่อาจารย์loginเข้าไปเพื่อส่งเกรด//////////////////////////
$sqlsel="SELECT * FROM registation r left join student s ON r.id_student=s.id_student
WHERE r.id_teacher='$user_id1' AND r.id_subject='$id_subject'";
$result=mysql_query($sqlsel) or die(mysql_error());
$Num_Rows = mysql_num_rows($result);
$i=0;
while($data=mysql_fetch_array($result)){
$i++;
$id_student=$data[id_student];
?>
<tr>
<td height="30"><div align="center"><? echo $i;?></div></td>
<td><div align="center"><span class="style23">
<?=$data[id_student];?>
</span> </div></td>
<td><div align="left">
<?=$data[stu_befor];?>
<?=$data[stu_name];?>
<?=$data[stu_sur];?>
</div></td>
<td><div align="center">
<input name="txtMid" type="text" id="txtMid" onkeyup="chk(this);" onfocus="sum()" onblur="sum()" onchange="sum()" onkeypress="check_number()" onkeyup="sum()" size="5" maxlength="2" />
</div></td>
<td><div align="center">
<input name="txtFinal" type="text" id="txtFinal" onkeyup="chkvalue(this);" onfocus="sum()" onblur="sum()" onchange="sum()" onkeypress="check_number()" onkeyup="sum()" size="5" maxlength="2" />
</div></td>
<td><div align="center">
<input name="txtSum" type="text" id="txtSum" onfocus="sum()" onblur="sum()" onchange="sum()" onkeypress="check_number()" onkeyup="sum()" size="5" maxlength="3" />
</div></td>
<td><div align="center">
<input name="txtGrade" type="text" id="txtGrade" size="5" maxlength="3" onfocus="sum()" onblur="sum()" onchange="sum()" onkeyup="sum()" />
</div></td>
</tr>
<?
}
?>
</table>
<p></p>
<p> </p>
<p align="center">
<input type="submit" name="button2" id="button2" value="บันทึกผลการเรียน">
<input type="reset" name="button3" id="button3" value="ยกเลิก">
<input type="hidden" name="id_student" value=" <?=$id_student;?>" />
<input type="hidden" name="id_subject" value="<?=$id_subject;?>" />
<input type="hidden" name="id_term value="<?=$id_term;?>" />
</p>
</form> </td>
</tr>
</table>
</body>
</html>
Date :
2010-04-28 13:54:47
By :
saowaluk052
Load balance : Server 02