Html 杂散开始标记脚本

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19958667/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 15:17:03  来源:igfitidea点击:

Stray start tag script

javascripthtml

提问by Eric Desjardins

I'm trying to get a tooltip from http://www.wowhead.com/hearthstone/tooltipsto work on my site but it doesn't work so I tried the W3C validator for answers and I got the following error:

我试图从http://www.wowhead.com/hearthstone/tooltips获取工具提示以在我的网站上工作,但它不起作用,所以我尝试了 W3C 验证器以获得答案,但出现以下错误:

Error Line 88, Column 84: Stray start tag script. …//static.wowhead.com/widgets/power.js">var wowhead_tooltips =…

错误第 88 行,第 84 列:杂散开始标记脚本。…//static.wowhead.com/widgets/power.js" >var wowhead_tooltips =…

Heres my code of that section:

这是我那部分的代码:

<script type="text/javascript" src="http://static.wowhead.com/widgets/power.js"> </script>

<script> var wowhead_tooltips = { "colorlinks": true, "iconizelinks": true, "renamelinks":       true } </script>

And it's within the <html>and <head>tags.

它在<html><head>标签内。

回答by

Validator gives that error when you've something outside </body>.

当您有外部内容时,验证器会给出该错误</body>

Just move your script tags inside <body>, or keep them in <head>.

只需将您的脚本标签移动到里面<body>,或者将它们保留在<head>.