HTML: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
Html <br /> | |||
:::[''statements''] <br /> | :::[''statements''] <br /> | ||
END | END Html | ||
== Description == | |||
The | The Html statement allows you to ember pure Html in your NS Basic/X program. This allows you to have additional functionality to your app. Statements within this block must follow all Htnl rules. They are ignored by NS Basic/X itself. For more information, see the Tech Note ‘The role of JavaScript and WebKit’. | ||
== Example == | |||
<pre> | <pre> | ||
'This sample shows how to add a button at runtime. | 'This sample shows how to add a button at runtime. | ||
Html | |||
<button onmousedown="button1()">Button 1</button> | <button onmousedown="button1()">Button 1</button> | ||
<div id="box">Box</div> | <div id="box">Box</div> | ||
End | End Html | ||
Function button1() | Function button1() | ||
box. | box.innerHtml= event.screenX & ", " & event.screenY | ||
End Function | End Function | ||
</pre> | </pre> | ||
== Output == | |||
<pre> | <pre> | ||
Line 28: | Line 28: | ||
</pre> | </pre> | ||
== Related Items == | |||
[[javascript|JAVASCRIPT]] | [[javascript|JAVASCRIPT]] | ||
[[Category:Language Reference]] |
Revision as of 01:29, 17 August 2012
Html
- [statements]
- [statements]
END Html
Description
The Html statement allows you to ember pure Html in your NS Basic/X program. This allows you to have additional functionality to your app. Statements within this block must follow all Htnl rules. They are ignored by NS Basic/X itself. For more information, see the Tech Note ‘The role of JavaScript and WebKit’.
Example
'This sample shows how to add a button at runtime. Html <button onmousedown="button1()">Button 1</button> <div id="box">Box</div> End Html Function button1() box.innerHtml= event.screenX & ", " & event.screenY End Function
Output
(a button and a box are displayed. Click the button and text is put in the box)