iLTC Home
Bookmark iLTC!
iLTC Google Boards

Google Groups
Receive The Code in Email!



Categories

Perl
  • Perl Tutorials Beginners

    Javascript
  • Javascript Tutorials
  • Javascript Tutorials Beginners

    HTML
  • HTML Tutorials



  • I love the code... dot com
    20,085

    iLoveTheCode.com
    Javascript > Javascript Tutorials How To Easy > Javascript Bold Text

    Javascript Bold Text



    j="This is a good time.";

    j=j.bold();

    document.write(j);

    Which Prints:
    This is a good time.

    -We created a variable and named it j because we like the letter j.
    -We applied Javascript's built-in bold method to our j string.
    -We stored those results back into j.
    -We used Javascript's built-in document.write to print to the browser.


    We could have also written this a little differently, like so:

    j="This is a good time.";

    document.write(j.bold());


    ADVANCED: You can also apply more than one method to the string:

    j="This is a good time.";
    j=j.italics().bold().link('http://google.com');
    document.write(j);

    or

    j="This is a good time.";
    document.write(j.italics().bold().link('http://google.com'));


    Free Copy and Paste Javascript Code:

    <script type="text/javascript">
    <!--

    i="This is a good time.";
    j=i.bold();

    document.write(i);
    document.write(j);
    document.write(i.bold());

    -->
    </script>


    Resources:
    A nice offsite Tutorial at JavaScript Kit
    Sun Javascript Documentation on Strings

    Italic Text in Javascript
    Redirect in Javascript
    Status Bar in Javascript
    Change Fonts in Javascript
    Change Font Size in Javascript

    HTML Tags
    HTML Color Chart
    HTML Codes


    Click HERE to comment or discuss at iLoveTheCode GOOGLE Group
    Previous Article: Javascript Redirect
    Next Article: Javascript Italics Text





    Dreamweaver CS3Dreamweaver CS3

    David McFarland

    New $29.69

    DojoDojo

    Matthew A. Russell...

    New $26.39

    jQuery in ActionjQuery in Action

    Bear Bibeault, Yeh...

    New $26.39

    Struts 2 in ActionStruts 2 in Action

    Don Brown, Chad Da...

    New $29.69

    Pro CSS and HTML Design ...Pro CSS and HTML Design Patterns

    Michael Bowers

    New $29.69

    CSSCSS

    David McFarland

    New $23.09

    Creating Web SitesCreating Web Sites

    Matthew MacDonald

    New $19.77

    CSS MasteryCSS Mastery

    Andy Budd, Simon C...

    New $23.09

    JavaScriptJavaScript

    David Flanagan

    New $31.49


    Of Interest:
  • Matching with a Regular Expression, REGEX, in Perl
  • And, Or, Equal, Not Equal, Greater Than, Less Than in Perl
  • Splitting an ARRAY in Perl
  • Finding the Length (Index Numbers) of an Array in Perl
  • Change a Form Field with Javascript
  • Javascript Referrer
  • Javascript Uppercase Text
  • PRINT to Browser with document.write Command in Javascript
  • HTML Tables
  • Make Italic Text Using HTML
  • HTML Underline Text
  • HTML Body Tag

  • More Articles:
  • Create or Put Items into an Array in Perl
  • Create a Subroutine in Perl
  • Delete a File Using unlink in Perl
  • What's in an Array, Index Numbers
  • Javascript Change Background Colors
  • Javascript Change Fonts
  • Javascript Change Font Size
  • Javascript Alert
  • Javascript Referrer
  • Javascript Status Bar
  • Getting Epoch Time in Javascript
  • Javascript Array - Create an Array in Javascript
  • Make a Line Return Using HTML
  • Make a New Paragraph Using HTML
  • HTML Subscript Text
  • HTML Color Codes

  • Search iLTC w/ Google





    Recent Articles

  • Javascript Focus Form Field
  • Javascript Lowercase Text
  • Javascript Uppercase Text
  • Javascript Superscript Text
  • Javascript Subscript Text
  • Make Text Blink Using Javascript
  • Make a String into a Link in Javascript
  • Javascript Italics Text
  • Javascript Bold Text
  • Javascript Redirect
  • HTML Frames
  • HTML Color Chart
  • HTML Link
  • Javascript Status Bar








  • Perl Programming - Javascript Programming - Maybe Some PHP - Free Scripts - ILoveTheCode
    All Content © 2006 iLoveTheCode.com


    Contact Chris | About this Site


    316,825
    Counter by iLoveTheCode.com


    Last Modified: Sunday, 09-Jul-2006 01:40:45 EDT