JavaSCript Question

 

Results 1 to 4 of 4
Hi, Im new to javascript This is what im trying to do. On my html ...
  1. #1
    EmailMaster's Avatar
    EmailMaster is offline Up Town Seo/247accs.com
    Join Date
    May 2011
    Location
    Canada
    Posts
    1,432
    Thanks
    759
    Thanked 306 Times in 169 Posts

    Default JavaSCript Question

    Hi,

    Im new to javascript

    This is what im trying to do. On my html page I have to have 4 different font sizes one thats 10px 20px 30px 40px then reset

    When i click or rollover on 10px the font size changes and displays the new size of the font in the Div Box.

    Also I have an input box so when i type in the input box and press submit it shows the text you typed in and displays it within the div box with the font assigned in the css.

    Thanks




  2. #2
    312k1t is offline Registered Member
    Join Date
    Oct 2012
    Posts
    49
    Thanks
    4
    Thanked 4 Times in 4 Posts

    Default Re: JavaSCript Question

    I am not sure what you need. With Javascript you can access to DOM. DOM is represenation of your html code. So you can access to every html tag (like <input ... /> ...) and do almost everything.

    In the example below. There is input element and in javascript I get element by ID and get atribute value of this element and print it to alert window. There is a lots of examples on internet.
    Code:
    <input id="myid" value="value" type=".." />
    
    <script>
    var inputElement = getElementById("myid");
    var value = inputElement.getAttribute('value');
    alert(value);
    </script>

  3. #3
    jazzc's Avatar
    jazzc is offline Programming & Web Design Moderator black hat forumsblack hat forumsblack hat forums
    Join Date
    Jan 2009
    Posts
    2,184
    Thanks
    6,090
    Thanked 7,042 Times in 2,496 Posts

    Default Re: JavaSCript Question

    Is this your homework?

  4. The Following 3 Users Say Thank You to jazzc For This Useful Post:

    BlueZero (01-25-2013), EmailMaster (01-26-2013), KraftyKyle (01-25-2013)

  5. #4
    EmailMaster's Avatar
    EmailMaster is offline Up Town Seo/247accs.com
    Join Date
    May 2011
    Location
    Canada
    Posts
    1,432
    Thanks
    759
    Thanked 306 Times in 169 Posts

    Default Re: JavaSCript Question

    Yup


Similar Threads

  1. Question - Javascript to auto-click Google+?
    By dtang4 in forum Black Hat SEO
    Replies: 0
    Last Post: 07-16-2011, 08:33 PM
  2. Javascript Timer Question
    By haydenm92 in forum HTML & JavaScript
    Replies: 4
    Last Post: 03-15-2011, 01:29 AM
  3. Replies: 1
    Last Post: 04-22-2009, 09:23 AM
  4. [QUESTION] Javascript Text Links??
    By deth_by_uv in forum White Hat SEO
    Replies: 4
    Last Post: 09-26-2008, 08:18 PM

Bookmarks

Posting Permissions

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




BlackHatWorld on Twitter BlackHatWorld on FaceBook


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109