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 bookmarked this site...
    125,021

    iLoveTheCode.com
    Javascript > Javascript Tutorials How To Easy > Splitting an Array using Javascript

    Splitting an Array using Javascript



    To split an array in Javascript:

    var ko = "London,Paris,France";

    var ji=ko.split(",");

    document.write(ji[0]);

    Which prints:
    London


    -We created an array and named it ko. We stored three lovely cities in ko.
    -We created a new array and named it ji. We split the ko array by commas and stored their pieces in ji.
    -We printed the first item in the ji array using the index number 0. (index numbers start with 0)



    Free Copy and Paste Javascript Code:

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

    var ko = "London,Paris,France";

    var ji=ko.split(",");

    document.write(ji[0]);


    -->
    </script>


    Resources:
    Print to Browser Using Javascript (document.write)


    Click HERE to comment or discuss at iLoveTheCode GOOGLE Group
    Previous Article: Environmental Variables Available in Javascript using Navigator Object
    Next Article: Setting a Cookie using Javascript





    Dreamweaver CS3Dreamweaver CS3

    David McFarland

    New $29.69

    JavaScriptJavaScript

    David Flanagan

    New $31.49

    Information Architecture...Information Architecture for the Wor...

    Louis Rosenfeld, P...

    New $26.39

    CSSCSS

    David McFarland

    New $23.09

    Bulletproof Web DesignBulletproof Web Design

    Dan Cederholm

    New $23.99

    CSSCSS

    Eric Meyer

    New $29.69

    New Perspectives on Crea...New Perspectives on Creating Web Pag...

    Patrick Carey

    New $69.26

    Creating Web SitesCreating Web Sites

    Matthew MacDonald

    New $19.77

    CSS MasteryCSS Mastery

    Andy Budd, Simon C...

    New $23.85


    Of Interest:
  • Encryption with the Crypt Function in Perl
  • Combine, Put Two Arrays Together in Perl
  • Add to End of an Array with Push in Perl
  • Write a FOR LOOP in Perl
  • Javascript Redirect
  • Javascript Referrer
  • Javascript Reset Form
  • Match with a Regular Expression, REGEX, in Javascript
  • HTML Subscript Text
  • HTML Frames
  • HTML Image
  • HTML Title Tag

  • More Articles:
  • If, Elsif, and Else in Perl
  • Splitting an ARRAY in Perl
  • Passing a Variable or Value to a Subroutine in Perl
  • Write a FOREACH LOOP in Perl
  • onClick Javascript
  • Passing an Argument or Variable to a Javascript
  • Change a Form Field with Javascript
  • PRINT to Browser with document.write Command in Javascript
  • Use innerHTML to Change Text on a Page
  • HTML Codes
  • HTML Tags
  • HTML Font Code
  • HTML Underline Text

  • 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


    421,786
    Counter by iLoveTheCode.com


    Last Modified: Friday, 23-Jun-2006 07:23:17 EDT