摘要:
<html><script language="JavaScript">function changFont( x ){ var font_style = x; var article = document.getElementById("article"); if( typeof font_style == "string" ){ article.style.fontWeight = font_style; } else { article.style.fontSize = font_style; }}< 阅读全文
posted @ 2013-04-01 14:33
飞翔@骑士
阅读(300)
评论(0)
推荐(0)
摘要:
<script type="text/javascript">// 定义构造函数,并设定一个属性function Person(name){ this.name = name;}// 为 Person 增加一个方法Person.prototype.showName = function(){ alert("我叫" + this.name);};// new 关键字实例化一个对象var Tom = new Person("Tom");// 运行该对象内的 showName() 方法Tom.showName();</sc 阅读全文
posted @ 2013-04-01 14:16
飞翔@骑士
阅读(127)
评论(0)
推荐(0)


浙公网安备 33010602011771号