Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 2 of 2
  1. #1

    Default [Code] jScirpt Alert! [jScript]

    Hey There fellow Habbos() Well this is a short code for jScript and alert message.

    Code:
    <!DOCTYPE html>
    
    <html>
    <head>
    </head>
    <style>body {background:#F3F3F3;font-family:Verdana;font-size:11px;margin:10px;}#wrapper {background:#FFF;padding:10px;border:1px solid #CCC;margin: auto; width: 530px;}a {text-decoration: underline; color: #000;}a:hover {font-weight: bold;}hr { margin:10px 0;padding:0;height:1px;background:#CCC;border:0 }</style>
    <body>
    
    <script type="text/javascript">
    function note() {
    alert ("Hey,Its Phoenix Wright");
    }
    note();
    </script>
    
    </body>
    </html>
    The First Open the code will be created when the page is opened.
    Code:
    <!DOCTYPE html>
    
    <html>
    <head>
    </head>
    <style>body {background:#F3F3F3;font-family:Verdana;font-size:10px;margin:10px;}#wrapper {background:#FFF;padding:10px;border:1px solid #CCC;margin: auto; width: 530px;}a {text-decoration: underline; color: #000;}a:hover {font-weight: bold;}hr { margin:10px 0;padding:0;height:1px;background:#CCC;border:0 }</style>
    <body>
    
    <script type="text/javascript">
    function note() {
    alert ("Oh No Edgeworth");
    }
    
    </script>
    <form>
    <input type="button" value="Click Here" onclick="note()">
    </form>
    </body>
    </html>
    But the second code will run when a button is clicked, so enjoy!

    Simple and easy I'll explain if anyone else needs me to, this can also be used for trolling like those sites that have alerts on 24/7
    Now I'll explain I think we all know that the <html> etc are all html tags.

    Post All Questions about this code, I'll be honored to answer them, I really cant explain things like this, but I can answer questions.

    I'll post a detailed tutorial, but for now insert the code in your HTML pages and watch magic.

  2. #2
    Join Date
    Aug 2004
    Location
    UK
    Posts
    11,283
    Tokens
    2,031

    Latest Awards:

    Default

    Not really sure its worth wrapping bothering to wrap the alert() in an additional function TBH if thats all your going to be doing. Its easier just to all the alert method directly.

    Code:
    <input type="button" value="Click Here" onclick="alert('A message!')">
    or if you want it on load

    Code:
    <script>alert("Hi!");</script>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •