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

Thread: Make text bold

  1. #1
    New Coder
    Join Date
    Apr 2010
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Make text bold

    Hello, I wonder if you guys.girls would be kind enough to help me. I have some code, but I need to make the " Total price will be :$xx " text to be in bold.

    Here is the code I have atm

    Code:
    <script type=text/javascript>
    function getTotal(){
    var form=document.theForm;
    var inputs=form.getElementsByTagName('input');
    var length=inputs.length;
    var total='0';
    
    for(i=0;i<length-1;i++){
    if(inputs[i].type=='radio'){
    var checked=inputs[i].checked?1:0;
    if(checked){
    var value=inputs[i].value.split("~~")[0];
    total-=-value;
    }
    }
    }
    document.getElementById('totalspan').innerHTML="Total price will be: $"+total
    total='0';
    }
    
    </script>
    
    
    </html>

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,865
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Code:
    document.getElementById('totalspan').innerHTML="<strong>Total price will be: $</strong>"+total
    Or add the following into your CSS
    Code:
    #totalspan{
    font-weight:bold;
    }
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    signman (12-26-2010)

  • #3
    New Coder
    Join Date
    Apr 2010
    Posts
    15
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thank you so much. You are most kind.


  •  

    Posting Permissions

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