正确答案,请鱼油认真筛查哈:<!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>
|