Read UL and Li By using JQuery and Javascript


<!DOCTYPE html><html><head>   <title></title></head><body>  <ul class=”ul-test”>    <li>a</li>    <li>b</li>    <li>c</li>    <li>d</li>  </ul></body></html> JQuery and JavaScript Script <script type=”text/javascript”>//By using JQuery$(document).ready(function(){  $(“.ul-test”).each(function(){     $(this).text();  });}); //By using Javascript- var ulObj = document.getElementsByClassName(“ul-test”)[0].children;for(let i=0; i<ulObj.length;i++){     console.log(ulObj[i]);    document.write(ulObj[i].innerText);}</script>

Reset Form with JavaScript Function


I going to shared simple JavaScript function for reset all form fields very easily. JavaScript: <script type=“text/javascript”> function reset(){   var demoObj = document.getElementsByClassName(“demo”);   for(let i=0;i<demoObj.length;i++){   //set blank for all input type field   demoObj[i].value=””;   if(demoObj[i].name===“A” || demoObj[i].name===“D”){  …