AVAN 发表于 2018-9-2 20:00:17

请问有人能帮我看看这里面哪里出错吗

这是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">&lt;!DOCTYPE html&gt;</span></div><div class="codeLine"><span class="codeTag">&lt;<span class="codeName">html</span> <span class="hljs-attr">lang</span>=<span class="codeAttrValue">"en"</span>&gt;</span></div><div class="codeLine"><span class="codeTag">&lt;<span class="codeName">head</span>&gt;</span></div><div class="codeLine">    <span class="codeTag">&lt;<span class="codeName">meta</span> <span class="hljs-attr">charset</span>=<span class="codeAttrValue">"UTF-8"</span>&gt;</span></div><div class="codeLine">    <span class="codeTag">&lt;<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>&gt;</span></div><div class="codeLine">    <span class="codeTag">&lt;<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>&gt;</span></div><div class="codeLine">    <span class="codeTag">&lt;<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>&gt;</span></div><div class="codeLine">    <span class="codeTag">&lt;<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>&gt;</span></div><div class="codeLine">    <span class="codeTag">&lt;<span class="codeName">title</span>&gt;</span>课后作业<span class="codeTag">&lt;/<span class="codeName">title</span>&gt;</span></div><div class="codeLine">    <span class="codeTag">&lt;/<span class="codeName">head</span>&gt;</span></div><div class="codeLine"><span class="codeTag">&lt;<span class="codeName">body</span>&gt;</span></div><div class="codeLine">    <span class="codeTag">&lt;<span class="codeName">p</span>&gt;</span>你最喜欢吃的水果是:<span class="codeTag">&lt;<span class="codeName">span</span> <span class="hljs-attr">id</span>=<span class="codeAttrValue">"fruit"</span>&gt;</span> <span class="codeTag">&lt;/<span class="codeName">span</span>&gt;</span><span class="codeTag">&lt;/<span class="codeName">p</span>&gt;</span></div><div class="codeLine">    <span class="codeTag">&lt;<span class="codeName">script</span>&gt;</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">&lt;/<span class="codeName">script</span>&gt;</span></div><div class="codeLine"><span class="codeTag">&lt;/<span class="codeName">body</span>&gt;</span></div><div class="codeLine"><span class="codeTag">&lt;/<span class="codeName">html</span>&gt;</span></div></code>
      </pre>
    </div>
</body>
</html>

AVAN 发表于 2018-9-11 02:27:34

好,我再仔细看看,谢谢老师耐心指导!
页: [1]
查看完整版本: 请问有人能帮我看看这里面哪里出错吗