Professional Documents
Culture Documents
<!DOCTYPE html>
<html lang="en">
<head>
<script>
function click() {
document.write("Welcome");
</script>
<meta charset="UTF-8">
<title>nishan</title>
</head>
<body>
<script>
body.appendChild(button);
button.addEventListener("click", function () {
});
</script>
</body>
</html>
Write a javascript program for onmouse over & on mouse out events
with example.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>nishan</title>
</head>
<body>
<style>
img {
height: 200px;
width: 200px;
</style>
<img onmouseover="bigImg(this)"onmouseout="normalImg(this)"
border="0"
src="https://www.mindcontroversy.com/wp-
content/uploads/2014/03/Hanuman-.jpg">
<script>
function bigImg(x) {
x.style.height = "400px";
x.style.width = "400px";
function normalImg(x) {
x.style.height = "100px";
x.style.width = "100px";
</script>
</body>
</html>
Make a html form having 3 fields of name, email and phone number
with submit button . write some validation code of form validation of
javascript which display error message when user try to submit
without filling this field.
<!DOCTYPE html>
<html lang="en">
<head>
<script>
function validateForm() {
let x = document.forms["myForm"]["fname"].value;
if (x == "") {
return false;
</script>
<title>nishan</title>
</head>
<body>
<section>
<div class="form-box">
<div class="form-value">
<h2>Registation form</h2>
<div class="inputbox">
</div>
<div class="inputbox">
</div>
<div class="inputbox">
</div>
<button>submit</button>
</div>
</form>
</div>
</div>
</section>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>nishan</title>
</head>
<body>
<?php
$x = 30;
$y=50;
$sum = $x+$y;
$sub = $x-$y;
$mul = $x*$y;
$div = $x/$y;
echo $sum;
echo $sub;
echo $mul;
echo $div;
?>
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>nishan</title>
</head>
<body>
<?php
?>
</body>
</html>
<?php
$servername = "localhost";
$username = "username";
$password = "password";
if ($conn->connect_error) {
?>
Create a table with following column roll no , name , class , subject , &
marks.
);
);