|
HTML
May 18, 2009 13:17:21 GMT -5
Post by lol2rubiks on May 18, 2009 13:17:21 GMT -5
Hey, you write HTML codes.
<html> <body> <p>Hi</p> </body> </html>
Hi
<html> <body> <script type="text/javascript"> var x=Math.random(); if (x >= 0.5) { document.write("Hi"); } else { document.write("Bye"); } </script> </body> </html>
50% you will get Hi. 50% you will get Bye.
Here's another way to produce that result:
<html> <body> <script type="text/javascript"> var x=Math.random(); try { if (x >= 0.5) { throw "high" } else { throw "low" } } catch (no) { if (no=high) { document.write("Hi") } else { document.write("Bye") } } </script> </body> </html>
Well the first method was simpler.
|
|
|
HTML
May 18, 2009 15:58:32 GMT -5
Post by Zhang on May 18, 2009 15:58:32 GMT -5
|
|
|
HTML
May 19, 2009 15:14:18 GMT -5
Post by lol2rubiks on May 19, 2009 15:14:18 GMT -5
you post it into notepad and get an html document.
|
|
|
HTML
May 19, 2009 16:37:23 GMT -5
Post by Zhang on May 19, 2009 16:37:23 GMT -5
</sup>
|
|
|
HTML
May 20, 2009 16:59:07 GMT -5
Post by lol2rubiks on May 20, 2009 16:59:07 GMT -5
thats not how you do it. It's called: <p>sup</p>
The <p> tag represents a paragraph. So then you put what you want to say in between the two tags.
I also know a third way how to do the second example.
|
|
|
HTML
May 22, 2009 20:54:21 GMT -5
Post by Zhang on May 22, 2009 20:54:21 GMT -5
wow
|
|
|
HTML
May 23, 2009 13:54:41 GMT -5
Post by lol2rubiks on May 23, 2009 13:54:41 GMT -5
ok.
<p>wow</p>
i'm going to learn php.
|
|
|
HTML
May 29, 2009 21:09:53 GMT -5
Post by Zhang on May 29, 2009 21:09:53 GMT -5
<p>wow</p>
|
|
|
HTML
May 30, 2009 8:59:59 GMT -5
Post by lol2rubiks on May 30, 2009 8:59:59 GMT -5
To change the color or something, use css or styles.
<p style="color:green; font-family:courier new">hi</p>
<?php
echo "Hi";
?>
|
|
|
HTML
May 30, 2009 19:15:14 GMT -5
Post by Zhang on May 30, 2009 19:15:14 GMT -5
|
|