Java, .NET, PHP, PYTHON, ANGULAR, .NET, ML, Data Scince, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

What is Javascript?

                                            

Javascript:-  It is the client-side (browser side) script-based language which is used to implement business logic, validation, animation, and dynamic design view in web application.

Javascript has modified and implemented using a different plugin.

1 Jquery

2 Angular

3 Angular Js

4 Node JS


Javascript Architecture:-

DOM (Document Object Model):-


Javascript provides a separate window with a document to contain and access all Html elements.
Javascript can provide accessibility to all HTML elements.





If we want to access an element using javascript then we can use


document.getElementById("idname").attribute

document.getElementByName("elementname").attribute

<input type="text" id="txt"  />


a=document.getElementById("txt").value;





We can write Javascript under HTML document because without HTML document JS has no role.

     <script>
     document.write("Welcome in JS");
     alert("welcom in JS");
    </script>

note:-  if we write JAVASCRIPT internally then we should define it under <head> section.

Complete Code with HTML and JS?

<!DOCTYPE html>
<html>
<head>
<title></title>
    <script>
     document.write("Welcome in JS");
     alert("welcom in JS");
    </script>

</head>
<body>
<p>Welcome in HTML</p>
</body>
</html>



How we declare a variable in Javascript?

we can directly declare a variable in JS without using datatype because JS is a loosely coupled script.

Syntax:-

identifier=value


<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript">
a=100;
b=200;
c=a+b;
document.write("<h1>"+ c +"</h1>");

</script>
</head>
<body>


</body>
</html>






Post a Comment

If you have any doubt in programming or join online classes then you can contact us by comment .

Previous Post Next Post