HTML text::
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>DOM Manipulation</title>
</head>
<body>
<div class="container">
<div class="child">child1</div>
<div class="child">child2</div>
<div class="child">child3</div>
<div class="child">child4</div>
</div>
<form class="" action="index.html" method="post">
<a href="/"></a>
<input type="text" name="" value="">
<button type="button" name="button">Click</button>
</form>
<script src="index11.js" charset="utf-8"></script>
</body>
</html>
JS text::
let a = document;
a= document.all;
// a=document.body;
// a=document.form;
// Array.from(a).forEach(function(element){
// console.log(element);
// });
a=document.links; // to get all link array
a=document.links[0].href; // to get the actuall link
console.log(a);
//use document.images and document.scripts to print the list of images and scripts on HTML pages
Comments
Post a Comment