码迷,mamicode.com
首页 > 其他好文 > 详细

预习。

时间:2016-11-21 07:54:35      阅读:164      评论:0      收藏:0      [点我收藏+]

标签:1.0   href   head   http   window   org   ima   www   ref   

<!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" xml:lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
    <title>网页标题</title>
    <meta name="keywords" content="关键字列表" />
    <meta name="description" content="网页描述" />
    <link rel="stylesheet" type="text/css" href="" />
    <style type="text/css"></style>
    <script type="text/javascript">
        //在文本中输入数据的语法
        document.write("<h1>JavaScript</h1>");
        document.write("<p>今天预习了一点点JavaScript的知识,document是对象,.是调用行为的标志,write就是行为,意思就是在document里面write括号里面的内容.</p>");
        //变量的定义、计算
        var a = 10;
        var b = 10*a+a;
        document.write("<font color=‘red‘>if a=10,b=10*a+a;<br />b=");
        document.write(b);
        //弹出警告框
        window.alert("要我教你数学吗?需要请点击确定")
    </script>
</head>
<body>
</body>
</html>

效果图:

技术分享

预习。

标签:1.0   href   head   http   window   org   ima   www   ref   

原文地址:http://www.cnblogs.com/panbee/p/6084036.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!