🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Javascript Beginner Part-1

Hi, I am going to introduce some examples on adding javascript with HTML pages. you can add javascript with the help of <script></script> tag within head or body section.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Initializing Variable</title>
</head>
<body>
<script>
// Varibale define and initiliazation
var price = 101;
document.write("Price :" +price);
//second statement
var product = "Apple";
document.write("<br>Product Name: " + product);
</script>
</body>
</html>

Now, I am going to discuss an external way of adding javascript to our web pages. you have to create one sample.js file and add the link in the main page under the <head></head> area.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>External Javascript</title>
<script src="sample.js" type="text/javascript"></script>
</head>
<body>
<h1>Adding Javascript by External Link</h1>
</body>
</html>

Let’s see an example of write function. this function is used to show the data on a webpage. for this you have to see an example below:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>write Function in Javascript</title>
<script>
document.write(4+2);
</script>
</head>
<body>
<h1>Using write function</h1>
</body>
</html>

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.