.:: Blackc0de Forum ::.
Would you like to react to this message? Create an account in a few clicks or log in to continue.

-=Explore The World From Our Binary=-
 
HomeIndeksLatest imagesPendaftaranLogin

 

  need little help this is not working for me :(

Go down 
5 posters
PengirimMessage
_6mO_HaCk
NuuBiiTooL
NuuBiiTooL
_6mO_HaCk


Jumlah posting : 13
Points : 23
Reputation : 0
Join date : 11.06.11

 need little help this is not working for me :( Empty
PostSubyek: need little help this is not working for me :(    need little help this is not working for me :( Icon_minitimeWed Nov 30, 2011 7:33 pm

<html>
<head>
<title>Grade Remarks</title>
<script type="text/javascript" language="javascript">
function check()
{
var a=document.getElementById('fid').value;
var regex1=/^[0-9-.]*$/;
if(document.theform.grd.value.length<1)
{

document.theform.grd.style.backgroundColor="pink";
alert("Please enter CGPA!");
}
else if(regex1.test(a)==false)
{
document.theform.grd.style.backgroundColor="red";
alert("Please enter numeric value only");
fid.focus();
}
else if(document.theform.grd.value>4 || document.theform.grd.value<1)
{
document.theform.grd.style.backgroundColor="lights kyblue";
alert("Numeric Value Must be Between 0 and 4");
}
else if(document.theform.grd.value>=1 && document.theform.grd.value<2)
{
document.theform.grd.style.backgroundColor="lime";
alert("Fair :: You got D grade");
}
else if(document.theform.grd.value>=2 && document.theform.grd.value♥)
{
document.theform.grd.style.backgroundColor="lime";
alert("Good :: You got C grade");
}
else if(document.theform.grd.value>=3 && document.theform.grd.value<4)
{
document.theform.grd.style.backgroundColor="lime";
alert("Very Good :: You got B grade");
}
else if(document.theform.grd.value=4)
{
document.theform.grd.style.backgroundColor="lime";
alert("Excellent :: You got A grade ");
}

}
</script>
</head>
<body>

<h1 align="center">BC100401308:: Assignment # 3 (CS101)</h1>
<form name="theform">
<table border="5px" align="center" >
<tr>
<td width="46">
CGPA </td>
<td width="199">
<input type="text" width="20px" name="grd" id="fid" />
</td>
</tr>
<tr>
<td>
&nbsp;
</td>
<td>
<input type="button" value="Find Grade" onclick=check/>
</td>
</tr>
</table>
</form>
</body>
</html>
Kembali Ke Atas Go down
CyberWild
Moderator
Moderator
CyberWild


Jumlah posting : 1665
Points : 2310
Reputation : 104
Join date : 11.06.11
Age : 43
Lokasi : internet cloud

 need little help this is not working for me :( Empty
PostSubyek: Re: need little help this is not working for me :(    need little help this is not working for me :( Icon_minitimeWed Nov 30, 2011 8:58 pm

what the syntax from the script?
Kembali Ke Atas Go down
http://cyberwild.p.ht/
zyunbi
NuuBiiTooL
NuuBiiTooL



Jumlah posting : 2
Points : 2
Reputation : 0
Join date : 30.11.11
Age : 34

 need little help this is not working for me :( Empty
PostSubyek: Re: need little help this is not working for me :(    need little help this is not working for me :( Icon_minitimeWed Nov 30, 2011 9:35 pm

ini buat apa gan????????

:)
Kembali Ke Atas Go down
Jiban
Corporal
Corporal
Jiban


Jumlah posting : 159
Points : 390
Reputation : 7
Join date : 09.07.11

 need little help this is not working for me :( Empty
PostSubyek: Re: need little help this is not working for me :(    need little help this is not working for me :( Icon_minitimeTue Mar 20, 2012 6:29 pm

zyunbi wrote:
ini buat apa gan????????

:)

read rules this room.
Kembali Ke Atas Go down
robofics
VIP Member
VIP Member
robofics


Jumlah posting : 709
Points : 804
Reputation : 20
Join date : 22.12.11
Lokasi : /dev/null

 need little help this is not working for me :( Empty
PostSubyek: Re: need little help this is not working for me :(    need little help this is not working for me :( Icon_minitimeWed Mar 21, 2012 3:22 pm

eh ? what are u trying to say ?
what the hell is going on with this script anyway ?

can u make it a bit clear for us ?
Kembali Ke Atas Go down
http://robofics.wordpress.com
Sponsored content





 need little help this is not working for me :( Empty
PostSubyek: Re: need little help this is not working for me :(    need little help this is not working for me :( Icon_minitime

Kembali Ke Atas Go down
 
need little help this is not working for me :(
Kembali Ke Atas 
Halaman 1 dari 1

Permissions in this forum:Anda tidak dapat menjawab topik
.:: Blackc0de Forum ::. :: BoarD Blackc0de :: International Room :: Programming (Int.)-
Navigasi: