Javascript 变量赋值 【每日一段代码40】

<html>
<body>
<script type="text/javascript">
var firstname;
firstname="George";
document.write(firstname);
document.write("<br><br>");

firstname="John"
document.write(firstname);
document.write("<p>脚本声明了一个变量,给变量赋值就显示该值,改变该值,然后再显示该值。 </p>");
</script>
</body>
</html>

posted on 2012-03-09 17:59  Cosimo  阅读(162)  评论(0编辑  收藏  举报

导航