|
JavaScript is a scripting language which is similar in
syntax to Java. The JavaScript code is embedded within
the HTML file and is interpreted by the client browser.
JavaScript brings interaction to the web pages. Using
JavaScript, it is possible to customize HTML documents
on the fly, write event handlers for elements on a
page, validate data at the client side and perform
other client-side computations. To view the various JavaScript examples, you need a JavaScript capable browser . I have tested my code only using Internet Explorer 3. If you find that any of the samples are not working properly, please mail me. About the languageJavaScript is a loosly typed language. You can use variables without declaring them first and freely convert between different types. Thus, the two expressionsx = 10 + "20" and x = "10" + 20are both valid in JavaScript. However in the first case, the value of x will be 30 whereas in the second case it will be "1020". This is because the data type of the result of an expression is the same as that of the left most element in the expression.
JavaScript is case sensitive. Thus Due to the security built into JavaScript, it is highly unlikely that JavaScript code can do damage on your system. So you can run them without worry. My JavaScript samplesAll the samples given here are small and simple. If you find any of them useful, feel free to copy it on your page. Drop me a mail and include the location of your page if possible. If you like this site, consider giving me a link. |