11CA 14 Introduction To JavaScript v2
11CA 14 Introduction To JavaScript v2
Part – II
Very Short Answers
1) Write a syntax of <script> tag
<script language="javascript" type="text/javascript">
JavaScript code
</script>
Eg : var no1,no2;
This dialog box has two buttons: OK and Cancel. If the user clicks the OK button, the prompt()
will return the entered value from the text box. If the user clicks the Cancel button, the
prompt() returns null. The Syntax of prompt dialog box is,
Prompt(“Message”,”defaultValue”);
(or)
window.prompt("sometext","defaultText");
Part –IV
Explain in Detail
1) Explain about the popup dialog boxes in JavaScript.
JavaScript supports some shorthand arithmetic operators like +=, -=, *=, /= and %= to
evaluate arithmetic calculations.