
JS Properties test
By: a guest on
May 25th, 2010 | syntax:
HTML | size: 0.49 KB | hits: 56 | expires: Never
<html>
<head>
<title>JS Properties test</title>
</head>
<body>
<script type="text/javascript">
try{
window.props = {
get prop(){
return window.propValue;
},
set prop(value){
window.propValue = value;
}
};
props.prop = "Property set at " + (new Date()).getTime();
document.write(props.prop);
}
catch(e){
document.write("Error! " + e);
}
</script>
</body>
</html>