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 = "\r\n";
var FF = "\f";
var DQUOTE = '\"';
var SQUOTE = "\'";
var BACKSLASH = "\\";
var BACKSPACE = "\b";
document.write("Column1" + TAB + "Column2" + TAB + "Column3")
//-->
</script>
Related examples in the same category