abc

Share This blog with your friends, so that we can improve more & more . our aim is to easy & simple way of learning.

4/08/2018

LEARN SESSION 8 -- HTML & JAVASCRIPT MORE DETAILS




Connect Laptop To Computer and laptop To TV Connectivity.










hi every one today i am going to start session 8 .

let us see more exmple to know detail connectivity of html & javascript

example 1:
<!DOCTYPE html>
<html>

   <head>
      <title>JavaScript & html connectivity</title>
    
    
      <script type = "text/JavaScript">
         function Hello() {
            alert("Hello, MAYUR");
         }
      </script>
   </head>

   <body>
      <input type = "button" onclick = "Hello();" name = "ok" value = "Click Me" />
   </body>

</html>
above exmple is alert message when user click on button it shows message of hello mayur.


let see another example

<!DOCTYPE html>
<html>
<body>

<p id="abc"></p>

<script>
var currentdate, somedate, output;
currentdate = new Date();
somedate = new Date();
someday.setFullYear(2018, 4, 18);

if somedate > currentdate) {
    output = "Today is not may 18, 2018.";
} else {
    output = "yes today is 18 may, 2018.";
  alert('oops!! ok try again for next time');
}
document.getElementById("abc").innerHTML = output;
</script>

</body>
</html>

in above example checking how current date is cheking for entered date if match then show certain result otherwise go to else condition it show message about try next time.

in below i use this script in which check if enter data is date below script get data from abc id tag & display result

<script>
var date1 = new Date();
document.getElementById("abc").innerHTML = isDate(date1);

function isDate(date1) {
    return date1.constructor.toString().indexOf("Date") > -1;
}
</script>

thanks for watching...please dont forget to share ..

An Introduction to the Laravel Framework: What It Is and Why You Should Use It

  If you're a PHP developer looking for a modern, efficient, and powerful framework to build web applications, look no further than Lara...