鱼C论坛

 找回密码
 立即注册
查看: 1999|回复: 2

[已解决]请问有人能帮我看看这里面哪里出错吗

[复制链接]
发表于 2018-9-2 20:00:17 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
这是009讲第二个动动手的课后作业,一个一个找出来改实体编号最后那些背景啊字体颜色等效果却无法显示出来,请问有人能帮我看看这里的问题吗?谢谢
下面是代码


<!DOCTYPE html>
<html>
<head><title>课后作业</title>
    <meta charset='utf-8'>
    <link rel="stylesheet" href="css/fishc.css">
    <style>
        .note-content {
            font-family: "Helvetica Neue", Arial, "Hiragino Sans GB", STHeiti, "Microsoft YaHei", "WenQuanYi Micro Hei", SimSun, Song, sans-serif;
        }
    </style>
</head>
<body>
    <div id='preview-contents' class='note-content'>
        <pre>
                        <class="prettyprint hljs-dark"><code class="hljs xml"><div class="codeLine"><span class="hljs-meta">&#60;!DOCTYPE html&#62;</span></div>
                        <div class="codeLine"><span class="codeTag">&#60;<span class="codeName">html</span> <span class="hljs-attr">lang</span>=<span class="codeAttrValue">"en"</span>&#62;</span></div>
                        <div class="codeLine"><span class="codeTag">&#60;<span class="codeName">head</span>&#62;</span></div>
                        <div class="codeLine">    <span class="codeTag">&#60;<span class="codeName">meta</span> <span class="hljs-attr">charset</span>=<span class="codeAttrValue">"UTF-8"</span>&#62;</span></div>
                        <div class="codeLine">    <span class="codeTag">&#60;<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"viewport"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"width=device-width, initial-scale=1.0"</span>&#62;</span></div>
                        <div class="codeLine">    <span class="codeTag">&#60;<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"keywords"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"小甲鱼,Web开发,HTML5,CSS3,Web编程教学"</span>&#62;</span></div>
                        <div class="codeLine">    <span class="codeTag">&#60;<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"description"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"《零基础入门学习Web开发》课后作业"</span>&#62;</span></div>
                        <div class="codeLine">    <span class="codeTag">&#60;<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"author"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"鱼C工作室"</span>&#62;</span></div>
                        <div class="codeLine">    <span class="codeTag">&#60;<span class="codeName">title</span>&#62;</span>课后作业<span class="codeTag">&#60;/<span class="codeName">title</span>&#62;</span></div>
                        <div class="codeLine"><span class="codeTag">&#60;/<span class="codeName">head</span>&#62;</span></div>
                        <div class="codeLine"><span class="codeTag">&#60;<span class="codeName">body</span>&#62;</span></div>
                        <div class="codeLine">    <span class="codeTag">&#60;<span class="codeName">p</span>&#62;</span>你最喜欢吃的水果是:<span class="codeTag">&#60;<span class="codeName">span</span> <span class="hljs-attr">id</span>=<span class="codeAttrValue">"fruit"</span>&#62;</span> <span class="codeTag">&#60;/<span class="codeName">span</span>&#62;</span><span class="codeTag">&#60;/<span class="codeName">p</span>&#62;</span></div>
                        <div class="codeLine">    <span class="codeTag">&#60;<span class="codeName">script</span>&#62;</span><span class="javascript"></span></div>
                        <div class="codeLine">        <span class="javascript"><span class="hljs-keyword">var</span> user_input = prompt(<span class="codeAttrValue">"你最喜欢吃的水果是:"</span>);</span></div>
                        <div class="codeLine">        <span class="javascript"><span class="hljs-built_in">document</span>.getElementById(<span class="codeAttrValue">"fruit"</span>).innerHTML = user_input;</span></div>
                        <div class="codeLine">    <span class="javascript"></span><span class="codeTag">&#60;/<span class="codeName">script</span>&#62;</span></div>
                        <div class="codeLine"><span class="codeTag">&#60;/<span class="codeName">body</span>&#62;</span></div>
                        <div class="codeLine"><span class="codeTag">&#60;/<span class="codeName">html</span>&#62;</span></div></code>
        </pre>
    </div>
</body>
</html>
最佳答案
2018-9-3 09:28:35
正确答案,请鱼油认真筛查哈:
<!DOCTYPE html>
<html>
<head><title>课后作业</title>
    <meta charset='utf-8'>
    <link rel="stylesheet" href="css/fishc.css">
    <style>
        .note-content {
            font-family: "Helvetica Neue", Arial, "Hiragino Sans GB", STHeiti, "Microsoft YaHei", "WenQuanYi Micro Hei", SimSun, Song, sans-serif;
        }
    </style>
</head>
<body>
    <div id='preview-contents' class='note-content'>
        <pre class="prettyprint hljs-dark"><code class="hljs xml"><div class="codeLine"><span class="hljs-meta"><!DOCTYPE html></span></div><div class="codeLine"><span class="codeTag"><<span class="codeName">html</span> <span class="hljs-attr">lang</span>=<span class="codeAttrValue">"en"</span>></span></div><div class="codeLine"><span class="codeTag"><<span class="codeName">head</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">meta</span> <span class="hljs-attr">charset</span>=<span class="codeAttrValue">"UTF-8"</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"viewport"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"width=device-width, initial-scale=1.0"</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"keywords"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"小甲鱼,Web开发,HTML5,CSS3,Web编程教学"</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"description"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"《零基础入门学习Web开发》课后作业"</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"author"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"鱼C工作室"</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">title</span>></span>课后作业<span class="codeTag"></<span class="codeName">title</span>></span></div><div class="codeLine">    <span class="codeTag"></<span class="codeName">head</span>></span></div><div class="codeLine"><span class="codeTag"><<span class="codeName">body</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">p</span>></span>你最喜欢吃的水果是:<span class="codeTag"><<span class="codeName">span</span> <span class="hljs-attr">id</span>=<span class="codeAttrValue">"fruit"</span>></span> <span class="codeTag"></<span class="codeName">span</span>></span><span class="codeTag"></<span class="codeName">p</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">script</span>></span><span class="javascript"></span></div><div class="codeLine"><span class="javascript">        <span class="hljs-keyword">var</span> user_input = prompt(<span class="codeAttrValue">"你最喜欢吃的水果是:"</span>);</span></div><div class="codeLine"><span class="javascript">        <span class="hljs-built_in">document</span>.getElementById(<span class="codeAttrValue">"fruit"</span>).innerHTML = user_input;</span></div><div class="codeLine"><span class="javascript"></span>    <span class="codeTag"></<span class="codeName">script</span>></span></div><div class="codeLine"><span class="codeTag"></<span class="codeName">body</span>></span></div><div class="codeLine"><span class="codeTag"></<span class="codeName">html</span>></span></div></code>
        </pre>
    </div>
</body>
</html>
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2018-9-3 09:28:35 | 显示全部楼层    本楼为最佳答案   
正确答案,请鱼油认真筛查哈:
<!DOCTYPE html>
<html>
<head><title>课后作业</title>
    <meta charset='utf-8'>
    <link rel="stylesheet" href="css/fishc.css">
    <style>
        .note-content {
            font-family: "Helvetica Neue", Arial, "Hiragino Sans GB", STHeiti, "Microsoft YaHei", "WenQuanYi Micro Hei", SimSun, Song, sans-serif;
        }
    </style>
</head>
<body>
    <div id='preview-contents' class='note-content'>
        <pre class="prettyprint hljs-dark"><code class="hljs xml"><div class="codeLine"><span class="hljs-meta"><!DOCTYPE html></span></div><div class="codeLine"><span class="codeTag"><<span class="codeName">html</span> <span class="hljs-attr">lang</span>=<span class="codeAttrValue">"en"</span>></span></div><div class="codeLine"><span class="codeTag"><<span class="codeName">head</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">meta</span> <span class="hljs-attr">charset</span>=<span class="codeAttrValue">"UTF-8"</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"viewport"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"width=device-width, initial-scale=1.0"</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"keywords"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"小甲鱼,Web开发,HTML5,CSS3,Web编程教学"</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"description"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"《零基础入门学习Web开发》课后作业"</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">meta</span> <span class="hljs-attr">name</span>=<span class="codeAttrValue">"author"</span> <span class="hljs-attr">content</span>=<span class="codeAttrValue">"鱼C工作室"</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">title</span>></span>课后作业<span class="codeTag"></<span class="codeName">title</span>></span></div><div class="codeLine">    <span class="codeTag"></<span class="codeName">head</span>></span></div><div class="codeLine"><span class="codeTag"><<span class="codeName">body</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">p</span>></span>你最喜欢吃的水果是:<span class="codeTag"><<span class="codeName">span</span> <span class="hljs-attr">id</span>=<span class="codeAttrValue">"fruit"</span>></span> <span class="codeTag"></<span class="codeName">span</span>></span><span class="codeTag"></<span class="codeName">p</span>></span></div><div class="codeLine">    <span class="codeTag"><<span class="codeName">script</span>></span><span class="javascript"></span></div><div class="codeLine"><span class="javascript">        <span class="hljs-keyword">var</span> user_input = prompt(<span class="codeAttrValue">"你最喜欢吃的水果是:"</span>);</span></div><div class="codeLine"><span class="javascript">        <span class="hljs-built_in">document</span>.getElementById(<span class="codeAttrValue">"fruit"</span>).innerHTML = user_input;</span></div><div class="codeLine"><span class="javascript"></span>    <span class="codeTag"></<span class="codeName">script</span>></span></div><div class="codeLine"><span class="codeTag"></<span class="codeName">body</span>></span></div><div class="codeLine"><span class="codeTag"></<span class="codeName">html</span>></span></div></code>
        </pre>
    </div>
</body>
</html>
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-9-11 02:27:34 | 显示全部楼层
好,我再仔细看看,谢谢老师耐心指导!
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-12-23 04:18

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表