Javascript in HTML PDF
Document Details
Podar International School
Tags
Summary
This document is about JavaScript in HTML for standard 8 computer science students. It explains scripting languages, their uses, different types of scripting languages, and JavaScript in detail. The document also provides examples of internal and external JavaScript coding.
Full Transcript
JAVASCRIPT IN HTML Std. VIII CS JavaScript in HTML 1 of 7 WHAT IS A SCRIPTING LANGUAGE? D e fi n i t i o n A s c r i p t i n g l a n g u a g e i s a p ro g r a m m i n g l a n g u a g e m a i n l y u s e d t o c re a t e interactive and dynamic websites and web applications. Uses Ad d...
JAVASCRIPT IN HTML Std. VIII CS JavaScript in HTML 1 of 7 WHAT IS A SCRIPTING LANGUAGE? D e fi n i t i o n A s c r i p t i n g l a n g u a g e i s a p ro g r a m m i n g l a n g u a g e m a i n l y u s e d t o c re a t e interactive and dynamic websites and web applications. Uses Ad d i n g i n t e r a c t i v i t y t o w e b p a g e s ( a d d p o p - u p w i n d o w s a n d d i a l o g b oxe s i n a w e b p a g e , t o s h o w a n d h i d e t h e c o n t e n t o f a w e b p a g e , a n d t o p e r f o rm calculations). Std. VIII CS JavaScript in HTML 2 of 7 TYPES OF SCRIPTING LANGUAGES Client-Side Scripting Languages Ru n o n a c l i e n t ’ s c o m p u t e r o n a b ro w s e r U s e d t o c h a n g e t h e i n t e r f a c e i n re s p o n s e t o a u s e r ’ s a c t i o n Examples: JavaScript, jQuery Server-Side Scripting Languages Ru n o n a w e b s e r v e r U s e d t o h a n d l e d a t a a n d s e r v e r- s i d e l o g i c E x a m p l e s : P H P , A S P. N E T Std. VIII CS JavaScript in HTML 3 of 7 WHAT IS JAVASCRIPT? D e fi n i t i o n JavaScript is one of the most popular client-side scripting language. It is commonly used to build web applications and even games. The code written in JavaScript is re f e rre d t o a s a ‘ s c r i p t. ’ T h e s e s c r i p t s a l l o w y o u t o m o d i fy e l e m e n t s o n a w e b p a g e b a s e d o n t h e a c t i o n s t a ke n by the user, making the web page interactive. Ke y Fe a t u r e s Ru n s d i re c t l y w i t h o u t b e i n g c o m p i l e d Client-side scripting language Case-sensitive language PStd. l a t fVIII o rmCS - i n d e p e n d e n t 4 of 7 JavaScript in HTML USING JAVASCRIPT WITH HTML Internal JavaScript E m b e d d e d d i re c t l y w i t h i n a n H T M L d o c u m e n t i n s i d e < s c r i p t > t a g s , t y p i c a l l y i n the or sections. External JavaScript S e p a r a t e J a v a S c r i p t fi l e l i n ke d t o a n H T M L d o c u m e n t u s i n g < s c r i p t s rc = " fi l e. j s " > < / s c r i p t > i n a s e p a r a t e fi l e w i t h t h e ex t e n s i o n ‘. j s ’. Std. VIII CS JavaScript in HTML 5 of 7 INTERNAL JAVASCRIPT Std. VIII CS JavaScript in HTML 6 of 7 EXTERNAL JAVASCRIPT Std. VIII CS JavaScript in HTML 7 of 7