Here is the Solution of how to print array element in HTML table. HTML Code: <p id=”demo”></p> JavaScript Code: var fruits, text, fLen, i; fruits = [“Banana”, “Orange”, “Apple”, “Mango”]; fLen = fruits.length; text = “<table border=’1′><tr><th>Index</th><th>Data</th></tr>”; for (i = 0; i < fLen; i++)...
Oracle Database: Lecture – 01
Question: What is data? Answer: Every organization has some information needs. A library keeps a list of members, books, due dates, and fines. A company needs to save information about employees, departments, and salaries. These pieces of information are called data.
Simple Exam Grading System
This is very simple grading system based on single subject marks. var mark=60 if(mark>60) { document.write(“pass”); } else{ document.write(“Fail”) } */ var mark=prompt(“Enter Mark”); if(mark>100) { document.write(“Invalid”); } else if(mark>90) { document.write(“A”); } else if(mark>80) { document.write(“B”); } else if(mark>70) { document.write(“C”); } else if(mark>60)...
JavaScript Abilities , What JS can do!
We know JavaScript can do many thing and most popular language in the world. Here I shall mention some of JS basic abilities. Ability-1: JS can change HTML attributesm like src attribute value of img tag.
In Seven Ways, Print Hello Coders in JavaScript
Now I shall write a very basic and starting example of JavaScript. We shall print “Hello Coders” into seven ways.
HTML form data retrieve using javascript
Javascript data retrieve from HTML Form: Js: function display(){ var fname=document.forms[‘myForm’][‘fname’].value; document.getElementById(‘demoName’).innerHTML=fname; var gender=document.forms[‘myForm’][‘gender’].value; document.getElementById(‘demoGender’).innerHTML=gender; var hobb=document.forms[0]; var hob =””; for(i=0; i<hobb.length;i++){ if(hobb[i].checked){ hob=hob+hobb[i].value+”, “; } } document.getElementById(‘demoGHobby’).innerHTML=hob; var en=document.forms[1]; var entry =””; for(i=0; i<en.length;i++){ if(en[i].checked){ entry=entry+en[i].value+”, “; } } document.getElementById(‘demoEntry’).innerHTML=entry; } HTML Form: <form...
JavaScript Problem-01
Question: We shall take some numbers like 1 to 10, From the mentioned numbers we shall print the odd numbers except 3 and 5 and at last also we shall make SUM of those odd number .
Array Basic Expalanation
Array is a special type of variable that can hold/contain more than one value at a time. Look at the example bellow var city1=”Dhaka”; var city2=”New York”; var city3=”Sydney”; var city4=”London”; In the above example, there are four variables and every variable contain one value...