I have windows vista- in case you need to know which system im working with...
my advice: DO NOT get vista- it sucks more D-I-C-K than paris hilton XDDDD
i am working on my computer and it says that i need to turn on javascript- how do you do that?
I m working on a website- and I want to use a timed photo gallery but at the same time would like user to scroll through the pictures. I m looking for something similar to the one on gamepro.com. I have an idea on how to do it on flash- but my boss prefers no flash.
2. Complete the following codes such that the user will be prompt for the age. Your script should pass the age to the function appropriately to check and get the result. Use alert box to display the result.
<html>
<head>
<title>Simple JavaScript</title>
<script type="text/javascript">
<!â"your function in (1) should be hereïƒ
</script>
</head>
<body>
<script type="text/javascript">
var age;
var result;
______________________________________
age=_____________; // convert age to number
__________________; // call the function to get the result
_________________; // use alert box to show the answer
</script>
</body>
</html>
This is what I did
<html>
<head>
<title>Simple JavaScript</title>
<script type="text/javascript">
function process()
{
var age=prompt("What s your age?");
if (age < 13)
{
alert("too young");
}
else
{
alert("ok");
}
}
</script>
</head>
<body onload="process()">
<script type="text/javascript">
var age;
var result;
age=parseInt(age)
function process(value) {
if (value<13)
return "too young";
else
return "ok";
}
result=process(age);
alert(result);
</body>
</html>
But when I tried to view it in Internet Explorer- it simply gave me "too young" even tho i havent been given the prompt up box...Please help me...IM GOING CRAZY...thanks
I have no prob viewing it in FireFox..but got prob with Internet Explorer..==
I don t really know any javascript- I m a decent programmer though (PHP- MySQL- Python- Django). Should I learn javascript before learning jquery? How do you suggest I go about it?
No comments:
Post a Comment