Defining Special Characters as Variables for Later Use : Char : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » Char »

 

Defining Special Characters as Variables for Later Use



/*
Symbol                Description

t                    Tab
n                    Newline
r                    Carriage return
f                    Form feed
\                    Backslash
b                    Backspace
"                    Double quote
'                    Single quote

*/

<script type="text/javascript">
<!--
  // Inline Character Constants
  var TAB = "t";
  var CR = "r";
  var LF = "n";
  var CRLF = "rn";
  var FF = "f";
  var DQUOTE = '"';
  var SQUOTE = "'";
  var BACKSLASH = "\";
  var BACKSPACE = "b";
   
  document.write("Column1" + TAB + "Column2" + TAB + "Column3")
//-->
</script>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» Char