We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
  • Pages:
  • 1
  • 2
Who knows JavaScript?
Topic Started: Mar 27 2005, 04:56 PM (1,038 Views)
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
Code:
 

<script>
/*One of the most annoying
loops you will ever need to
know for js*/
var x = 0;
while (x<1)
{
alert("I do, message " + x);
}
</script>


that will be infinate
Offline Profile Quote Post Goto Top
 
Seth
Member Avatar
I has a pony
[ *  *  *  *  *  *  *  *  * ]
kingy
March 28, 2005 02:31 PM
Code:
 

<script>
/*One of the most annoying
loops you will ever need to
know for js*/
var x = 0;
while (x>1)
{
alert("I do, message " + x);
}
</script>


that will be infinate

Actually that will never occur :angel:
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
my bad, fixed it

*kingy always gets < and > muddled
Offline Profile Quote Post Goto Top
 
solinent
Member
[ *  *  * ]
I kno I kno!

Code:
 

<html>
<head>
<title>poped you!</title>
<script language="javascript">
<!--
function pop()
{
var pop = 0
alert('I am Better than you!  Give me a random number so I can display it! :S')
var pop = prompt("Well...","")
}

i=100

//Heh i Know ther's no point in the next part..but what the heck!!

for (n=0, n<i, n++)
{
i + 1
var str="Your number is..."
}
//-->
</script>
</head>
<body onLoad="pop()">
<script>
<!--
if (pop = 0)
{
pop = "Why didn't you enter a number!"
}
if (pop = false)
{
pop = "You didn't enter a number!"
}
document.writeln(str)
document.writeln(pop)
</script>
<p>This is valid xhtml too! yay!</p>
</body>
</html>


LOL
Offline Profile Quote Post Goto Top
 
Das
Member Avatar
Smells of rich mahogany
[ *  *  *  *  *  *  * ]
Just to be boring I do ;)
Offline Profile Quote Post Goto Top
 
JoeC
Euch! IE tastes horrible!
[ *  *  *  *  * ]
I know the interesting / fun bits (read between the lines)
Offline Profile Quote Post Goto Top
 
DMUniverse
Member
[ * ]
Code:
 
<script>
for (var a = 0; a < 1000; a++)
{
IDO();
}
<script>

<!-- Yay!  It prints "I do!" 1000 times!  -->
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
does it?
Offline Profile Quote Post Goto Top
 
Cool Dude 2k
<?php echo "Linux"; ?>
[ *  * ]
DMUniverse
March 30, 2005 11:59 AM
Code:
 
<script>
for (var a = 0; a < 1000; a++)
{
IDO();
}
<script>

<!-- Yay!  It prints "I do!" 1000 times!  -->

:rolleyes: >_<
Code:
 
<script language="text/Javascript" type="text/javascript">
function IDO()
{
document.writeln('IDO');
}
for (var a = 0; a < 1000; a++)
{
IDO();
}

<!-- Yay!  It prints "I do!" 1000 times!  -->
</script>

:) ^_^
Offline Profile Quote Post Goto Top
 
kingy
1 in 10 people understands binary, the other 1 doesn't
[ *  *  *  *  *  * ]
thats better, lol
Offline Profile Quote Post Goto Top
 
DMUniverse
Member
[ * ]
yes, but it was assumed that I was appending it to his program. But you guys didn't get that I guess.
Offline Profile Quote Post Goto Top
 
gamefreak11
Member Avatar
Arcade Coder
[ *  *  *  *  *  * ]
Quote:
 
Huh??

</script>
<script>

Why would you do that??


lol, I did not even see that!
Offline Profile Quote Post Goto Top
 
drangonsile
Member
[ *  *  *  * ]
<script language="Javascript">

document.write("I know the document write and not much else (alittle about functions)")

</script>
Offline Profile Quote Post Goto Top
 
toby
Member
[ *  * ]
solinent
March 29, 2005 06:16 PM
I kno I kno!

Code:
 

<html>
<head>
<title>poped you!</title>
<script language="javascript">
<!--
function pop()
{
var pop = 0
alert('I am Better than you!  Give me a random number so I can display it! :S')
var pop = prompt("Well...","")
}

i=100

//Heh i Know ther's no point in the next part..but what the heck!!

for (n=0, n<i, n++)
{
i + 1
var str="Your number is..."
}
//-->
</script>
</head>
<body onLoad="pop()">
<script>
<!--
if (pop = 0)
{
pop = "Why didn't you enter a number!"
}
if (pop = false)
{
pop = "You didn't enter a number!"
}
document.writeln(str)
document.writeln(pop)
</script>
<p>This is valid xhtml too! yay!</p>
</body>
</html>


LOL

wdf does that do? sumthing that sprouts :geek: :qb: when you put numbers in?

Quote:
 
*Qj goes sit in a corner, being pissed about being wrong

hehe go :rory: :rory: :rory: who the hell is rory?

Offline Profile Quote Post Goto Top
 
Rory
i;m a mess
[ *  *  *  *  *  *  * ]
I am Rory.

And solinent, your IF() statement wouldn't work because you used = instead of ==

:)
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Technology Chat · Next Topic »
Add Reply
  • Pages:
  • 1
  • 2