$("#loadtv").on("click",function(myfunc23){
var chart4 = new TradingView.widget({
container_id: 'chart4',
"width": "100%",
"height": "100%",
"locale": "en",
"importanceFilter": "-1,0,1",
"currencyFilter": "USD"
})
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="loadpage">
<button id="loadtv">Show Calendar Event</button>
<div id= "tvaa" class= "tvcx tvapp row">
<div id="chart4"></div>
<script type="text/javascript" src="https://s3.tradingview.com/external-embedding/embed-widget-events.js"></script>
</div>
</div>
嗨,当单击按钮时,我正在尝试在 div 中打开交易视图的日历小部件。出于某种原因,同样的方法适用于图表小部件,但不适用于日历。帮助表示赞赏!链接到 tradingview 日历小部件脚本:https ://www.tradingview.com/widget/economic-calendar/