|
Code -To- HTMLThis ActiveX control, which was written with Visual Basic 5.0, takes in JavaScript, VBScript, or VB code, and inserts <SPAN> tags with associated class names, for easy color formatting with HTML and CSS. To use it, paste in or type in some code, select CSS class names for the different code elements (Objects, Keywords, Comments, Operators, and Arguments), and then press OK. The result will be the entered code with <SPAN class="ClassName"> tags surrounding all of the aforementioned elements. All that needs to be done is to create a Style Sheet to indicate how those <SPAN> tags should appear. For example, consider the following code: function MyFunction(arg) { var x = 10; for (var i = 0; i <= x; i++) { document.writeln(i); } return false; } Now consider the following Style Sheet:
The result: function MyFunction(arg) { var x = 10; for (var i = 0; i <= x; i++) { document.writeln(i); } return false; } This simplifies the task of showing code examples in HTML, when special Style Sheet formatting is desired.
|
|