JS Base _ String

Source: Internet
Author: User

1 <!DOCTYPE HTML>2 <HTML>3     <Head>4         <MetaCharSet= "Utf-8" />5         <title></title>6         <Scripttype= "Text/javascript">7             8             /*9 * Data type refers to the type of literalTen * A total of six data types in JS One * String Strings A * Number Value - * Boolean Boolean value - * Null empty value the * Undefined Not defined - * Object Objects -              *  - * Where string number Boolean Null undefined belongs to the base data type + * While object belongs to reference data type -              */ +              A             /* at * String Strings - *-strings need to be quoted in JS - *-You can use double or single quotes, but don't mix - *-quotation mark cannot be nested, double quotation mark cannot put double quotation mark, single quotation mark cannot put single quotation mark -              */ -             varStr= 'Hello'; in              - Str= 'I said: "It's a nice day today!" "'; to              +              -             /* the in the string we can use \ as the escape character, * you can use \ to escape when representing some special symbols $                      Panax Notoginseng \ "represents" - \ ' expression ' the \ n = line break + \ t Tab A \ \ Indicates the              * */ + Str= "I said: \ \ \ \ \ \ "Today is a nice day!" \""; -              $ Str= "\\\\\\"; $              -             //output literal string str -             //alert ("str"); the              -             //output Variable strWuyi             //alert (str); the              -              Wu             varstr2= "Hello"; -              About str2= "Hello"; $              - str2= 3; -              - alert (str2);//3 A              +              the         </Script> -     </Head> $     <Body> the     </Body> the </HTML>

JS Base _ String

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.