English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

What do you suggest if I want to write numbers from 1 to 200 in my web page using html commands? (Dont want to use ASP or PHP)

2006-11-16 06:12:21 · 4 answers · asked by x_squared 4 in Computers & Internet Programming & Design

4 answers

you can use javascript, insert any of these pieces of code in your page:



result:
i'm number 1
i'm number 2
i'm number 3
..
i'm number 200

----------------------------------------------------
you can change the break line with any tag you want



result:
1 - 2 - 3 - ... - 200

----------------------------------------------------
you can add some condition



result
1 - 2 - 3 - ... - 100
101 - 102 - ... - 200

-----------------------------------------------
remember:
-"i" represents the generic number
-you can write anything you want (just like html coding) in the parameter of document.write("this is the parameter"). to concatenate string use the operator + (it's very intuitive).
es. "i'm number" is equal to "i'm " + "number" (don't forget spaces).
in that way you can insert html tag around your numbers
es.
document.write("

" + i + "
");

2006-11-16 06:23:19 · answer #1 · answered by Matteo M 3 · 0 0

HTML does not deal with any logic functions. The easiest way to do this would be to use Jsva Script.

2006-11-16 14:16:44 · answer #2 · answered by C.J. 2 · 0 0

You can use an ordered list.


  1. Item 1

  2. Item 2

  3. Item 3

  4. Item 4

  5. ...
    ...
  6. Item 200



Or you can use JavaScript, which works on the following browswers and any newer version:

Internet Explorer 3.0

Netscape Navigator 3.0

Mozilla 1.0

Mozilla Firebird 1.0

Opera 3.5

2006-11-16 19:25:33 · answer #3 · answered by sapsolaris 1 · 0 0

HTML is a language for demonstrate data (formatting language)
but in this language you can use scripts than are programming languages .
for scripting you can use VB SCRIPT and JAVA SCRIPT.
both of them have loops
vb script has for ------- next loop and java script has for(;;){ } loop.

2006-11-16 14:22:26 · answer #4 · answered by Mazyar Mehranpoor(mzr_ir@yahoo) 2 · 0 0

fedest.com, questions and answers