Skip to main content

Java cript :

 Document1



<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body onload="fun()">
    <button onclick="fun()">JSR</button>
    <button onclick="run()">RANCHI</button>
    <button onclick="bun()">BOKARO</button>
    <div id="op"></div>
    <script>
        function fun()
        {
            document.getElementById("op").innerHTML="<b>Jamshedpur</b> is a large city set between the Subarnarekha and Kharkai rivers in the east Indian state of Jharkhand. It’s known for huge, tree-lined Jubilee Park, where the Tata Steel Zoological Park has resident species including tigers and leopards. To the east, the hilltop Bhuvaneshwari Temple has an elaborate 5-story entrance tower. North of the city, elephants roam through the forests at Dalma Wildlife Sanctuary.";
        }
        function run()
        {
            document.getElementById("op").innerHTML="<b>Ranchi</b> is the capital of the Indian state of Jharkhand. Ranchi was the centre of the Jharkhand movement, which called for a separate state for the tribal regions of South Bihar, northern Odisha, western West Bengal and the eastern area of what is present-day Chhattisgarh. ";

        }
        function bun()
        {
            document.getElementById("op").innerHTML="<b>Bokaro</b>, officially known as Bokaro Steel City, is a large and planned city in Jharkhand, India. It is the fourth most populous city in the state and one of the first planned cities of India. Bokaro is the administrative headquarters of Bokaro district.";
        }
    </script>
</body>
</html>

Using of Airthmetic operator: + , - , * , / , % , **.

To find Sum of two numbers.


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   
    <script>
        var a, b, sum;
        a=10;
        b=20;
        sum=a+b;
       //alert(sum);
       alert("Result= "+ sum);
    </script>
</body>
</html>

To find Area of a circle with alternate calling method.


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var r, result;
        r=10;
        result= 3.14*r*r;
        alert("Result= " + result);
    </script>
</body>
</html>

Using of Assignment Operator. = , += ,-= ,*= , /=


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        a=10;
        a+=5;
        alert(a);
    </script>
</body>
</html>

Using of Comparision operator: == , === , <= , >= , != (not equal to).

Eligible for vote / Not Eligible for vote

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
       let age;
       age=30;
       if(age>=18)
       {
        alert("Eligible for vote");
       }
       else{
        alert("Not Eligible for vote");
       }
    </script>
</body>
</html>

Even No./Not Even No.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
       var n;
       n=44;
       if(n % 2 == 0)
       {
        alert("Even No.");
       }
       else{
        alert("Not Even No.");
       }
    </script>
</body>
</html>

Positive no. /Negative no./ zero

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
       var n;
       n=44;
       if(n > 0)
       {
        alert("Positive No.");
       }
       else if(n < 0)
       {
        alert("Negative No.");
       }
       else{
        alert("Value is Zero")
       }
    </script>
</body>
</html>

Comments

Popular posts from this blog

Digital Technology and Microprocessor

   SYLLABUS OF DTM FOR DIPLOMA 1.  BOOLEAN ALGEBRA, BASIC LOGIC GATES AND FAMILIES   – 06 hrs  Number system, Features of logic algebra, postulates of Boolean algebra, Theorems of Boolean algebra. Boolean function. Derived logic gates: Exclusive-OR, NAND, NOR gates, their block diagrams and truth tables. Logic diagrams from Boolean expressions and vica-versa, Converting logic diagrams to universal logic. Positive, Negative and mixed logic, Logic gate conversion.TTL logic gate characteristics. MOS & CMOS logic families  2.  COMBINATIONAL SYSTEMS & MINIMIZATION TECHNIQUES  - 06 hrs  Minterm, Combinational logic circuit design, half and full adder, subtract or. Binary serial and parallel adders. BCD adder. Binary multiplier, Binary to Gray decoder, BCD to decimal, BCD to 7- segment decoder. Multiplexer, De multiplexer, Encoder. Maxterm, Karnaugh Map, Kmap upto 4 variables, Simplification of logic functions with K-map, conversion of truth...

control system

  Delay Time The time required for the response to reach 50% of the final value in the first time is called the delay time. Rise Time The time required for response to rising from 10% to 90% of final value, for an overdamped system and 0 to 100% for an underdamped system is called the rise time of the system. Peak Time The time required for the response to reach the 1st peak of the time response or 1st peak overshoot is called the Peak time. Maximum overshoot The difference between the peak of 1st time and steady output is called the maximum overshoot. It is defined by Settling Time (t s ) The time that is required for the response to reach and stay within the specified range (2% to 5%) of its final value is called the settling time . Steady State Error (e ss ) The difference between actual output and desired output as time't' tends to infinity is called the steady state error of the system. ...

Memory Unit Computer Architecture

  Memory Hierarchy A memory unit is an essential component in any digital computer since it is needed for storing programs and data. Typically, a memory unit can be classified into two categories: The memory unit that establishes direct communication with the CPU is called  Main Memory . The main memory is often referred to as RAM (Random Access Memory). The memory units that provide backup storage are called  Auxiliary Memory . For instance, magnetic disks and magnetic tapes are the most commonly used auxiliary memories. Apart from the basic classifications of a memory unit, the memory hierarchy consists all of the storage devices available in a computer system ranging from the slow but high-capacity auxiliary memory to relatively faster main memory. The following image illustrates the components in a typical memory hierarchy. Auxiliary Memory Auxiliary memory is known as the lowest-cost, highest-capacity and slowest-access storage in a computer system. Auxiliary memory ...