Friday, December 30, 2011

CONFIRM

<!--The sdandard confirm message box is used frequently. The site visitor must hit either "OK" or "Cancel" button. Through confirm method we can make very interesting things  f.e. either to direct a visitor a certain site or a page of the site, or to close the window.
Below you can get some examples of the confirm method. You may try them by H
TML GENERATOR.-->

<html>
<head>
<title>Example 1</title>
<script language="javascript" type="text/javascript">
window.confirm("If you are agree with me");
</script>
</head>
<body>
</body>
</html>
____________________________________________

<html>
<head>
<title>Example 2</title>
<script language="javascript" type="text/javascript">
function my_funct()
{
window.confirm("If you are agree with me");
}
</script>
</head>
<body>
<input name="My button" id="My button" type="button" value="click me" onclick="my_funct()">
</body>
</html>
_____________________________________________

<html>
<head>
<title>Example 3</title>
<script language="javascript" type="text/javascript">
function my_funct()
{
var condish = window.confirm('If you are +18, you can enter here.Clicl  "Ok"'+'\n'+ 'Or click "Cancel" ');
if (condish) {
window.alert("Welcome to my blog http://iamnorayr.blogspot.com!");
}  else window.close() ;
}
</script>
</head>
<body>
<input name="My button" id="My button" type="button" value="click me" onclick="my_funct()">
</body>
</html>
___________________________________________________

<html>
<head>
<title>Example 4</title>
<script language="javascript" type="text/javascript">
function my_funct()
{
var condish = window.confirm('Do you want to visit to my blog? .Clicl  "Ok"'+'\n'+ 'Or click "Cancel" ');
if (condish) {
window.open("http://iamnorayr.blogspot.com", "");
}  else  window.close();
}
</script>
</head>
<body>
<input name="My button" id="My button" type="button" value="click me" onclick="my_funct()">
</body>
</html>

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.