<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Function</title>
<script type="text/javascript">
function Greet(who){
alert("Greetings " + who + " !");
}
</script>
</head>
<body>
<h1>Function Example</h1>
<p>Prepare to be greeted twice.</p>
<script type="text/javascript">
Greet("Cepollun");
Greet("Eri");
</script>
</body>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Function</title>
<script type="text/javascript">
function Greet(){
who=document.theform.greetname.value;
alert("Greetings " + who + " !");
}
</script>
</head>
<body>
<h1>Function Example</h1>
<p>Prepare to be greeted twice.</p>
<div><form name="theform">
<input type="textarea" name="greetname" />
<input type="button" name="button1" value="Enter!" οnclick="Greet();" >
</form></div>
</body>