Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2005
    Posts
    26
    Thanks
    0
    Thanked 0 Times in 0 Posts

    my script for colors, I need help with trying to make a script to increasing the text

    I need some help trying to make a script to increase and decrease the text on the webpage. I have more that the options listed....

    <script language="javascript">
    function colorChange()
    {
    document.bgColor=document.list.colors.options[document.list.colors.selectedIndex].value;
    }
    </script>
    Change Background Color:
    <form name="list">
    <select name="colors">
    <option value="006633">Default
    <option value="black">Black
    <option value="white">White
    </select>
    <input type="button" value="Change Background color" name="myButton" onClick="colorChange()" />
    </form>
    <BODY bgColor=#006633>
    <script language="javascript">
    function change()
    {
    document.fgColor=document.text.color.options[document.text.color.selectedIndex].value;
    }
    </script>
    Change Color of Text:
    <form name="text">
    <select name="color">
    <option value="black">Default
    <option value="black">Black
    <option value="white">White
    </select>
    <input type="button" value="Change Text color" name="myButton2" onClick="change()" />
    </form>

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,501
    Thanks
    3
    Thanked 500 Times in 487 Posts
    Code:
     
    
    document.getElementsByTagName('Body')[0].style.fontSize='25px';

  • #3
    Regular Coder
    Join Date
    Nov 2004
    Location
    The Netherlands
    Posts
    551
    Thanks
    0
    Thanked 0 Times in 0 Posts
    CATdude about IE6: "All your box-model are belong to us"


  •  

    Posting Permissions

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