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



  • Pass the Javascript, please...
    20,088

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

    Javascript Italics Text



    j="This is a good time.";

    j=j.italics();

    document.write(j);

    Which Prints:
    This is a good time.

    -We created a variable and named it j because the letter j is easy to type.
    -We applied Javascript's built-in italics 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.italics());


    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.italics();

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

    -->
    </script>


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

    Bold 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 Bold Text
    Next Article: Make a String into a Link in Javascript





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

    Michael Bowers

    New $29.69

    CSSCSS

    Eric Meyer

    New $29.69

    DojoDojo

    Matthew A. Russell...

    New $26.39

    Head First HTML with CSS...Head First HTML with CSS & XHTML

    Eric Freeman, Elis...

    New $26.39

    CSS MasteryCSS Mastery

    Andy Budd, Simon C...

    New $23.09

    Struts 2 in ActionStruts 2 in Action

    Don Brown, Chad Da...

    New $29.69

    HTML, XHTML, and CSS, Si...HTML, XHTML, and CSS, Sixth Edition ...

    Elizabeth Castro

    New $23.09

    Dreamweaver CS3Dreamweaver CS3

    David McFarland

    New $29.69


    Of Interest:
  • If, Elsif, and Else in Perl
  • Matching with a Regular Expression, REGEX, in Perl
  • To See if a Directory Exists in Perl
  • Check for Existing File in Perl
  • If, Else If, and Else in Javascript
  • Call your Function in Javascript
  • Javascript Superscript Text
  • Formatting Time in Javascript
  • HTML Frames
  • HTML Tables
  • HTML Link
  • Make Italic Text Using HTML

  • More Articles:
  • INCREMENT and DECREMENT a Variable in Perl
  • Encryption with the Crypt Function in Perl
  • Passing a Variable or Value to a Subroutine in Perl
  • Exit a Script or Subroutine in Perl
  • onClick Javascript
  • Javascript Alert
  • Javascript Change Fonts
  • Javascript Change Background Colors
  • Javascript Status Bar
  • Javascript Reset Form
  • Javascript Concat - Use Concat to Join Two Arrays in Javascript
  • Use onMouseOut in Javascript
  • HTML Body Tag
  • HTML Image
  • HTML Title Tag
  • HTML Frames

  • 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,828
    Counter by iLoveTheCode.com


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