General HTML/Web Design Programming Q`s/ONBEFOREUNLOAD

Advertisement


Question
Hello

I would like to ad ONBEFOREUNLOAD to my website. Can I customize the message that pops up? The site isn't written yet, but I have a test page.

Could you possibly show me where to put the code, and what changes I might need to make? Any explanations and resources will be most appreciated. My code is below. Thank you.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ONBEFOREUNLOAD</title>
<style type="text/css">
<!--
.style1 {
  font-family: "Comic Sans MS";
  font-weight: bold;
  background-position: center center;
  color: #0000FF;
}
-->
</style>
</head>

<body>
<div align="center">
 <div align="center"></div>
 <div align="center"></div>
 <span class="style1">THIS PAGE REPRESENTS ANY PAGE ON MY SITE</span></div>
</body>
</html>

Answer
Lynn, I believe what you are looking for is here at W3schools.com

http://www.w3schools.com/jsref/event_onunload.asp

The W3 is the developer and maintains the standards of HTML, it is the best resource for web design.

http://www.w3schools.com

Nancy

General HTML/Web Design Programming Q`s

All Answers


Answers by Expert:


Ask Experts

Volunteer


Nancy Janyszeski

Expertise

I can help with basic HTML questions and web development concepts. I do not write JavaScript, but can help with the concept of using and where to find it.

Experience

Experience in the area.I am Microsoft Office User Specialist (MOUS) Master Certified and was certified as a MOUS Authorized Instructor. Instructional design and test writer for Skills Advantage LLC, http://skillsadv.com/, Test Publisher and E-learning Solutions Provider

Publications
Courseware, intro and advanced HTML

Education/Credentials
Microsoft MOUS certified, ICDL certified

Past/Present Clients
Vocational Schools

©2016 About.com. All rights reserved.