Saturday, November 21, 2020

how to create Simple Javascript App?

In this lesson you will learn how to create LB TO KG converter with validation. you will learn HTML, CSS, Bootstrap and in Javascript you will learn function, event if else and many more. Please click on video to watch. You can modify css and Bootstrap. Design may not be ideal here because purpose is to show topics .

                            Soruce Code:

<html lang="en">
    <meta charset="UTF-8"></meta>
    <meta content="width=device-width, initial-scale=1.0" name="viewport"></meta>
    <title>LB To KG Calculator</title>
            height: 350px;
            width: 200px;
            border: 2px solid black;
            text-align: center;
            margin-top: 100px;;
            margin-left: 225px;
            color: red;

    <link crossorigin="anonymous" href="" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" rel="stylesheet"></link>
    <div id="container">
    <h1>LB to KG Calculator</h1>
    <h3><span id="error"></span></h3>
    LB:<input id="lb" type="text" />
    KG:<input id="kg" type="text" /><br /><br />
    <button class="btn btn-warning" id="submit" type="button">Submit</button>
         lb =document.getElementById("lb");
         kg =document.getElementById("kg");
         error =document.getElementById("error");
         submit =document.getElementById("submit");
         submit.addEventListener("click", function(){ 
            if(lb.value ==""){
                error.innerText ="Please Enter Valid Number"

            } else{



LB To KG Calculator

LB to KG Calculator


java switch statement | Java Tutorial For Beginners

 Switch statement is alternative and more cleaner way to write code if we have more than two options. we can use else if, this is better way...