我遇到的问题令人沮丧。我已经在我的 localhost 和 codepen 中尝试过解决这个问题,但我无法解决这个问题。本质上,我有两个 Javascript,一个运行新闻提要,一个用于运行 DOW 的自动收报机磁带。但是,它们不会同时运行。任何帮助将不胜感激。注意:这一切都建立在引导 CSS 之上。<head><meta charset="utf-8" content="width=device-width initial-scale=1"><title>Predictive Trades</title><link rel="stylesheet" href="{% static 'css/style.css' %}"><link rel="stylesheet" href="{% static 'css/fixed.css' %}"><link rel="stylesheet" href="{% static 'css/bootstrap.css' %}"></head><body><!--- Start Landing Page Section ---><div class="landing"> <div class="home-wrap"> <div class="home-inner"> </div> </div></div><div class="caption text-center"> <h1>Advanced Market Analytics</h1> <h3>Enter Company Below to get Started</h3> <div class="container h-100"> <div class="d-flex justify-content-center h-100"> <div class="searchbar"> <input class="search_input" type="text" name="" placeholder="Search..."> <a href="#" class="search_icon"><i class="fas fa-search"></i></a> </div> </div> </div></div><div intrinio-widget-type="ticker_tape" intrinio-widget-tickers="DOW30"> <script> (function(f,i,n,t,e,c,h){f['IntrinioWidgetsObject']=e;f[e]=f[e]||function(){ (f[e].q=f[e].q||[]).push(arguments)},f[e].l=1*new Date();c=i.createElement(n), h=i.getElementsByTagName(n)[0];c.async=1;c.src=t;h.parentNode.insertBefore(c,h) })(window,document,'script','https://widget-api-cdn.intrinio.com/intrinio-widgets.min.js','iw'); iw('initialize', {userId: '2095ee9f024bec258d15150a90bbe843bdd1271613906cd7b5125229f23d654b'}) </script></div><!--- End Landing Page Section ---></div><!--- End Home Section ---><!--- Start Market Section ---><div id="market" class="offset"> <div class="col-12"> <h1 class="heading">Today's Highlights</h1> </div> <div class="jumbotron"> <div class="narrow"> </div>
1 回答
吃鸡游戏
TA贡献1829条经验 获得超7个赞
使用它来加载您的新闻。你在哪里使用 window.onload 我猜你的另一个功能是阻止窗口被完全加载,这样当 dom 准备好时它就会被触发。
<div id=news class="text-white-50">
<script>
document.onreadystatechange = function(e)
{
if (document.readyState === 'complete')
{
news();
}
};
</script>
</div>
添加回答
举报
0/150
提交
取消