Sunday, January 17, 2016

Closing Web Page in JavaScript

A simple code that I wrote in JavaScript that enables the use to close the webpage using JavaScript. The code is very simple and easy to understand.

If you have some questions please send me an email at jakerpomperada@gmail.comand jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.


Sample Program Output


Program Listing

<html>
<head>
<title>Phofile Records in Javascript </title>
<script language = "Javascript">
function func_close()
{
window.close();
var feature = "status = off, menubar = off, location = off, toolbar = off, height = 500, width = 500, top = 20, left = 150";
}
</script>
</head>

<body bgcolor = "lightgreen" text = "blue">
<center>
<img src = "garnet1.jpg" alt = "logo" width = "25%" height = "35%">
<hr size = 4 color = "blue" width = "75%">
<table>
<tr>
<td width = "50%"> <b> STUDENT'S NAME: </b>
<td> <b> Alice Maria Sandoval</b>
</tr>
<tr>
<td> <b> COURSE CODE: </b>
<td> ABC102 - J05 
</tr>
<tr>
<td> <b> SCHEDULE: </b>
<td> TTh / 3 - 6 PM
</tr>
<tr>
<td> <b> SOC: </b>
<td> October 1, 2016
</tr>
<tr>
<td> <b> EOC: </b>
<td> December 31, 2016
</tr>
</table>
<hr size = 4 color = "blue" width = "75%">
<form name = "aboutme">
<input type = "button" name = "close_but" value = "Close" ONCLICK = "func_close();">
</center>

</body>
</html>



No comments:

Post a Comment