Go Back   Hardware Forums > Software Support Forums > Web Development

Reply
 
LinkBack Thread Tools
Old 19-03-2006, 06:52 AM   #1 (permalink) Top
Big Geek
 
gumdigger's Avatar
 
Join Date: Jul 2002
Age: 31
Posts: 150
Times Helpful: 1
My Mood: Amused
Status: Offline

My Computer

Default Javascript/FOR loop

Hi
Does anyone here know how to use the FOR loop in javascript
if yes then can they show me how to write a 20 times table.

__________________
* INTEL PENTIUM D 3.2GHZ 2X1MB 840 DUAL CORE
* MSI 945P PLATINUM INTEL 945P SKT775 DDR2 DUAL CORE
* 4 x GEIL 512MB PC4300 DDR2
* SEAGATE 200GB 8MB SATA HDD, Seagate 300GB SATA2
* Pioneer DVR-110 16x DL
* TASK PSU 520W 34A
* ATI RADEON X800GT 256MB PCI-E DUAL DVI
* Running 32bit edition of Windows XP PRO + SP2
* DirectX 9.0C
  Reply With Quote
Whats this? diNovo Media Desktop Laser
diNovo Media Desktop Laser
Seller Price (inc. VAT) Delivery Total Price Availability Seller Rating
Dell £125.95 Free £125.95 In Stock Rated: 0 out of 5 - Number of votes: 0
Misco.co.uk £126.49 £3.99 £130.48 In Stock Rated: 4 out of 5 - Number of votes: 1355
IT247.com £113.29 Free £113.29 In Stock Rated: 4 out of 5 - Number of votes: 38
Old 19-03-2006, 11:18 AM   #2 (permalink) Top
The King

 
Addis's Avatar
 
Join Date: Jan 2004
Age: 18 Male
Posts: 5,255
Times Helpful: 403
My Mood: Drunk
Status: Offline

My Computer

Code:
<script type="text/javascript">
var i = 0
var num = 20
for (i=1; i <= 10; i++)
{
document.write(i + " times 20 is " + num)
document.write("<br />")
num = num + 20
}
</script>
That'll print them, change the code to suit.
__________________
Never trust a program you don't have the source code for.

My website | Powerful Desktop Linux | Linux for human beings | Linux for power users | Linux for ricers
Send a message via MSN to Addis   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
going forever in restart loop. blackakira Windows OS's 1 29-11-2005 01:44 AM
Fresh Javascript Browser Exploit syngod News and Article Comments 0 26-06-2005 10:08 PM


All times are GMT +1. The time now is 10:17 AM.


Copyright © 2000 - 2008 · HARDWAREFORUMS.COM · All rights reserved