JavaScript library functions
Input and Output functions
IO Methods from BOM:
Input method
window.prompt()
Output method
window.alert()
example:
<script>
var number=window.prompt("Enter a number:");
alert(number);
</script>
IO Methods from DOM:
input:
var data=document.getElementById("input_element_id").value;
output:
document.getElementById("output_element_id").innerHTML=data;
Comments 0