Whiteship's Note

'자바스크립트 특수문자'에 해당되는 글 1건

  1. 2007.07.09 JavaScript Special Characters

JavaScript Special Characters

AJAX/JavaScript : 2007.07.09 14:08


참조 : http://www.w3schools.com/js/js_special_characters.asp

자바스크립트의 문자열에서 따옴표(")나 엠퍼세드(&)를 입력하기 위해서는 \를 사용해야 합니다.
Code Outputs
\' single quote
\" double quote
\& ampersand
\\ backslash
\n new line
\r carriage return
\t tab
\b backspace
\f form feed


예)
var txt="We are the so-called "Vikings" from the north." (X)
var txt="We are the so-called \"Vikings\" from the north." (O)
document.write ("You \& me are singing!")

'AJAX > JavaScript' 카테고리의 다른 글

JavaScript Array Object  (1) 2007.07.09
JavaScript Date Object  (1) 2007.07.09
JavaScript String Object  (1) 2007.07.09
JavaScript Objects Introduction  (0) 2007.07.09
JavaScript Guidelines  (0) 2007.07.09
JavaScript Special Characters  (0) 2007.07.09
JavaScript The onerror Event  (2) 2007.07.09
JavaScript Throw Statement  (0) 2007.07.09
JavaScript Try...Catch Statement  (0) 2007.07.09
JavaScript Events  (2) 2007.07.09
JavaScript For Loop와 While Loop  (1) 2007.07.09
top

Write a comment.