music
OSdata.com: programming text book 

OSdata.com

script basics

summary

OSdata RSS
News Feed


OSdata blog RSS.

OSdata blog RSS - add to Bloglines
OSdata blog RSS - add to Google Reader.
OSdata blog RSS - add to My AOL
OSdata blog RSS - add to Newsgator.

    This section describes the basics of scripting in JavaScript.

    This is part of an instructional series on the building of a Forth programming environment in any standard browser using JavaScript.

    Threaded Interpreted Languages (TILs), including Forth, are designed for customization.

    In addition to writing your own Forth programs, please modify the underlying engine to meet your specific needs.

    Please have fun with this project. Make it your own.

    The most recent version is at stable release version or http://www.twiddledom.com/coder/js78.html

    Free Open Souce: Licensed under MIT license. License printed in full below.

previous page   next page
previous page
HTML tags and doctype
  next page
raw stack
Google

script basics

summary

summary

    This section describes the basics of scripting in JavaScript.

JavaScript

    There are several locations where JavaScript can appear in HTML source. For now, we will look at script that appears in the head section.

    Open up a JavaScript with tthe script tag, using the type attribute to indicate that you are using JavaScript.

<script type="text/javascript">

    Immediately follow the script tag with an opening comment tag. This will prevent old browsers from incorrectly displaying your JavaScript as plain text.

<script type="text/javascript">
<!--

    End your script with a closing comment tag, resuming normal processing of HTML tags. Precede the end comment tag with the JavaScript for a comment line (two forward slashes) so that the closing comment tag isn’t incorrectly interpretted as a bad JavaScript command.

<script type="text/javascript">
<!--
//-->

    And finish the section with a closing script tag.

<script type="text/javascript">
<!--

//-->
</script>

    http://www.twiddledom.com/coder/js2.html will show a working example of the material covered on this web page.

return to Forth in JavaScript
return to Outrageous Coder

previous page   next page
previous page
HTML tags and doctype
  next page
raw stack

contact
comments, suggestions, corrections, criticisms

because of ridiculous spam attacks,
contact through Twitter (@OutrageousCoder) will be more reliable than the contact form

please contact us

your name:
email address:
phone number:
message:

return to table of contents
free downloadable college text book

license

    This is example code from OSdata, This Side of Sanity, and Twiddledom, released under the MIT License.

    Copyright © 2014, 2015 Milo

    Licensed under the MIT License. You may obtain a copy of the License at

        http://opensource.org/licenses/MIT

    The MIT License (MIT)

    Copyright © 2014, 2015 Milo

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

previous page   next page
previous page
HTML tags and doctype
  next page
raw stack

Google


Made with Macintosh

    This web site handcrafted on Macintosh computers using Tom Bender’s Tex-Edit Plus and served using FreeBSD .

Viewable With Any Browser


    †UNIX used as a generic term unless specifically used as a trademark (such as in the phrase “UNIX certified”). UNIX is a registered trademark in the United States and other countries, licensed exclusively through X/Open Company Ltd.

    Names and logos of various OSs are trademarks of their respective owners.

    Copyright © 2014 Milo

    Created: October 10, 2014

    Last Updated: October 10, 2014


return to table of contents
free downloadable college text book

previous page   next page
previous page
HTML tags and doctype
  next page
raw stack