JavaScript初记

<li>
<textarea title="The famous clock" onclick="alert(this.value)">thisValue Test</textarea>
</li>


<script type="text/javascript" language="javascript">
function getName(){
	return "Tom";
}
var user = new Object();
user.name = getName;
//调用方法
var num = user.name(); 
alert(num);
</script>

你可能感兴趣的:(JavaScript,java)