Java Script
Java Script
EX 1:
Create a webpage that displays a dialogue box with message "welcome“
on loading :
Write the following HTML tags, and save the file with .htm extension.
<body>
<script>
alert("welcome");
</script>
</body>
EX 3:
Create a function that displays "Arab Republic of Egypt" via a message box
<script>
function country()
{
alert ("Arab republic of Egypt");
}
</script>
</body>
Textbox content manipulation
-When a button clicked, an alert box will be displayed in which the content of
the textbox can be seen
EX 4:
Note:
<html> Give a name form1 to the <form>
<body> element (name="form1")
Give a name t1 to the textbox
<form name="form1"> (name="t1")
<input type="text"name="t1">
<input type="button"onclick="word()"value="click me">
</form>
<script>
function word()
{
alert(form1.t1.value);
}
</script>
</body>
</html>
School book answered
questions
Complete the following statements: