gpt4 book ai didi

javascript - 我在 html 中运行函数时遇到错误

转载 作者:行者123 更新时间:2023-12-03 04:26:13 24 4
gpt4 key购买 nike

我有一个需要从 html 调用的函数。然而,我目前的通话方式导致了类型错误。有人可以告诉我如何运行这个函数: splitboxes();在我的 html 标记中。

该函数是较早声明的,如果我仅运行“splitboxes”,但需要将其作为函数调用,则该函数可以工作。

谢谢

$("html").append("<div id='dialog-success' />");
var dialogSuccess = $("#dialog-success");
dialogSuccess.html('<br />Here the details of your submitted intake ' +
'<br /><b><font color="green">' + depts + '</font></b><br />' + splitboxes(); +
' This entry was successfully submitted to the database.<br />Thank you.');

最佳答案

您有语法错误:

...+ splitboxes(); + ...

...+ splitboxes() + ...

请使用IDE来进行编码。它可以让你免去很多头痛:)

关于javascript - 我在 html 中运行函数时遇到错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43704281/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com