<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript">
var $status = true;
function Shop($Id,status){
if(status==true){
alert("We are Open: "+$Id);
document.getElementById($Id).innerHTML="Yes We Have Changed";//puts the new text in.
$status = false;
} else{
alert("We are Closed: "+$Id);
document.getElementById($Id).innerHTML = "Click Me"; //puts the new text in.
$status = true;
}
}
</script>
</head>
<body>
<div id="123" onclick="Shop(123,$status)">Click Me</div>
<div id="124" onclick="Shop(124,$status)">Click Me</div>
<div id="125" onclick="Shop(125,$status)">Click Me</div>
</body>
</html>
|