what html and javascript codes do you know?

  • azza2
    25th May 2011 Member 0 Permalink
    i know one:

    javascript tag

    <!-- Script courtesy of <a href="http://www.web-source.net" target="_blank" rel="nofollow">http://www.web-source.net - Your Guide to Professional Web Site Design and Development
    var message="Copyright Year by Your Site. WARNING ! All content contained within this site is protected by copyright laws. Unauthorized use of our material is strictly prohibited.";
    function click(e) {
    if (document.all) {
    if (event.button==2||event.button==3) {
    alert(message);
    return false;
    }
    }
    if (document.layers) {
    if (e.which == 3) {
    alert(message);
    return false;
    }
    }
    }
    if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN);
    }
    document.onmousedown=click;
    // -->



    this script disables rightclick and displays a message instead (doesn't work in google chrome)

    to use the scripts:
    open notepad and type:



    your web page title

    place script here



    replace 'your web page title' with a title of your choice
    replace 'place script here' with the script you wish to test

    save as whatever file name you want.html

    YOU MUST ADD .HTML AT THE END. it is the hypertext markup language file extension, which is the format of most webpages. you must therefore, save it as a webpage format. type .html at the end (dont forget the dot)

    open the webpage in internet and hey presto!!!

    please note that by default, powdertoy disables javascript tags. please state if there is a script tag like i did with the above script

    script tags are enclosed in <>
    this is a script tag (without the <>): SCRIPT language="Javascript"

    this is a java script tag at the end of the script (without the <>):
    /SCRIPT
  • Neospector
    25th May 2011 Member 0 Permalink
    image
    Edit: Found one,
    import java.util.Random;

    /** Generate 10 random integers in the range 0..99. */
    public final class RandomInteger {

    public static final void main(String... aArgs){
    log("Generating 10 random integers in range 0..99.");

    //note a single Random object is reused here
    Random randomGenerator = new Random();
    for (int idx = 1; idx <= 10; ++idx){<br /> int randomInt = randomGenerator.nextInt(100);
    log("Generated : " + randomInt);
    }

    log("Done.");
    }

    private static void log(String aMessage){
    System.out.println(aMessage);
    }
    }
  • azza2
    25th May 2011 Member 0 Permalink
    @Neospector (View Post)
    error on page. was there meant to be SCRIPT language="Javascript" tags?
  • Neospector
    25th May 2011 Member 0 Permalink
    @azza2 (View Post)
    How should I know? I just wanted an excuse to post that picture again and find something to do.
  • devast8a
    25th May 2011 Former Staff 0 Permalink
    while(1)
    alert();
  • TheWiseEyes
    25th May 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • azza2
    25th May 2011 Member 0 Permalink
    @TheWiseEyes (View Post)

    error

    PS: do you know any html or javascript?


    Name:

    Email:




    there's something. try it!


    edited: there's supposed to be a textbox in there. if you can't see it, click quote and cut and paste the following code (only visible after clicking quote) into notepad and save as form.html:



    form example



    Name:

    Email:




  • Uberness
    25th May 2011 Member 0 Permalink
    @azza2 (View Post)

    whatever
    whatever
    whatever
    whatever
    whatever
  • devast8a
    25th May 2011 Former Staff 0 Permalink
    @Neospector (View Post)
    That's Java, not Javascript
  • MasterMind555
    25th May 2011 Member 0 Permalink
    @azza2 (View Post)

    http://pastebin.com/55gWUjVx

    There's an error in that code, find it