Code

From Online Manual

Revision as of 19:59, 7 May 2010 by Admin (talk | contribs) (Created page with '<tr><td><center><span style="font-size: 12pt;" class="bbc_size"><tt>'''<span id="post_code">code</span>'''</tt></span></center></td><td><center>'''Code'''</center></td><td><cente…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
code
Code
<img src="http://docs.simplemachines.org/Themes/default/images/bbc/code.gif" alt="" class="bbc_img" />

[code]if (node.attributes[i].nodeValue != null) str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"';[/code]The code tag outputs code directly with simple formatting. Any BB Codes, html, php, javascript, c++, or any other text will be outputted exactly the same. The box will scroll for long lines so that the line breaks are preserved at the correct places, which is important in many languages. This is a block level tag.

: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a>

if (node.attributes[i].nodeValue != null) str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"'; [code]<?php echo "Hello world!"; ?>[/code]If php code is placed inside, with the initial <?php tag, then it will be color formated according to php syntax.

: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a>

<?php echo "Hello world!"?>