Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
当我将粘贴JavaScript代码从站点操作微移复制到Atom中时,它不会';不符合?_Javascript_Html_Css - Fatal编程技术网

当我将粘贴JavaScript代码从站点操作微移复制到Atom中时,它不会';不符合?

当我将粘贴JavaScript代码从站点操作微移复制到Atom中时,它不会';不符合?,javascript,html,css,Javascript,Html,Css,当我在Action Nudge中键入以下代码以显示易趣股票列表时,如下图所示 <script type="text/javascript" src="//www.auctionnudge.com/feed/item/js/theme/responsive/page/init/img_size/120/cats_output/dropdown/search_box/1/show_logo/1/lang/english/SellerID/expedite-allocations/sit

当我在Action Nudge中键入以下代码以显示易趣股票列表时,如下图所示

<script
  type="text/javascript"
  src="//www.auctionnudge.com/feed/item/js/theme/responsive/page/init/img_size/120/cats_output/dropdown/search_box/1/show_logo/1/lang/english/SellerID/expedite-allocations/siteid/3/MaxEntries/6">
</script>
<div id="auction-nudge-items" class="auction-nudge"></div>

它在Atom(代码软件)中不起作用。当你用一个结束标记关闭脚本时,正如你在代码中看到的那样,轻推动作给了我,代码失去了它的颜色,就像它已经失效一样,因此在我加载它时,它既不能正确注册,也不能在站点中显示。我需要在脚本上方添加一些内容才能使其正常工作吗?我很困惑。请帮忙。另外,我是HTML/CSS的初学者,但从未使用过JavaScript

以下是网页上的全部代码:

<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <meta name="viewpoint" content="width=device-width">
        <meta name="description" content="Providing for your medical needs">
        <meta name="author" content="Benjamin Willis">
        <title>Expedite Allocations</title>
        <link rel="stylesheet" href="./style.css">
    </head>

        <body style="background-color:white;">
            <header>
                    <div class="container">
                        <div id="branding">
                        <img width="300" height="150" src="Expedite-Logo-jpg.png" alt="Expedite Allocations" />
                    </div>
                        <nav>
                            <span><a href="Expedite Allocations Website.html">Home<a/></span>
                            <span><a href="about us.html">About Us<a/></span>
                            <span><a href="equipmentstore.html">Equipment Store<a/></span>
                            <span><a href="location.html">Location<a/></span>
                            <span><a href="contact us.html">Contact Us<a/></span>
                        </nav>
                </header>

        <script type="text/javascript" src="//www.auctionnudge.com/feed/item/js/theme/responsive/page/init/img_size/120/cats_output/dropdown/search_box/1/show_logo/1/lang/english/SellerID/expedite-allocations/siteid/3/MaxEntries/6"></script><div id="auction-nudge-items" class="auction-nudge"></div>

加快拨款
家
关于我们
设备库
地方
联系我们

哦!所以它对我有效,这让我很困惑。但是我在网上运行它,我猜你正在打开一个文件。在链接到易趣脚本之前,您需要选择
http://
https://
。现在只有一个
/
,它告诉浏览器在加载页面时使用协议。在计算机上打开文件时,此协议是
file://
。所以我猜浏览器正在尝试使用文件协议连接eBay,这显然是失败的

这只是HTML的一个片段,您的整个HTML文件是什么样子的?您是否包含DOCTYPE和
html
标记?@Matthias我已经编辑了我的问题,将剩下的代码包含在html中。请看一看。非常感谢。是的,已经解决了!非常感谢。然而它看起来不像是应该如何进行的,就像Action Nudge展示了股票列表的外观一样。它缺乏风格。但我可以看到,由于缺乏更好的比喻,它以某种“受伤”的形式出现了?你知道为什么吗?