问题标签 [function-call]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
6 回答
57245 浏览

php - 如何在 JavaScript 中调用 PHP 函数?

我有

index.php

myscripts.js

select我的问题是每次用户更改任何元素的值时如何调用 PHP 函数。

0 投票
12 回答
97784 浏览

java - 如何在 Java 中进行“引用调用”?

  1. 如何在 Java 中进行“引用调用”?(假设我们使用该术语的方式与自 1960 年代以来在同行评审的 CS 文献中使用的方式相同;请参阅此 Wikipedia 页面以获得简单的解释。)

  2. 既然 Java 不支持指针,那怎么可能像我们在 C 和 C++ 中那样在 Java 中通过引用来调用函数?

0 投票
3 回答
6285 浏览

python - 函数调用中的双括号是什么意思?例如 func(foo)(bar)

我一直使用这个成语在 Python 2 中以 utf-8 标准输出一堆内容:

但老实说,我不知道它(sys.stdout)在做什么。它让我想起了 Javascript 闭包之类的东西。但我不知道如何在 Python 文档中查找这个成语。

你们中的任何人都可以解释这里发生了什么吗?谢谢!

0 投票
1 回答
453 浏览

c - 效率 - 条件语句中的函数调用

如果我有一些看起来像这样的代码:

someInteger如果计算结果为真,会调用该函数吗?

ps 用 GCC 编译-O2

0 投票
3 回答
517 浏览

javascript - 调用 JavaScript 函数的方法

当 div 的显示设置为无时,如何调用 JavaScript 函数?

这是我的代码:

我在想有一个每次都重复的函数(类似于 actionscript ENTER_FRAME 事件),其中包含 if 语句,但我想这会带来很多滞后。

对不起,如果我不够清楚。

0 投票
2 回答
381 浏览

java - 函数调用期间的空指针异常

调用函数时出现空指针异常。
这是我的代码:

这是我的输出:

为什么即使有 forForm 的内存位置,我也会收到空指针异常?


编辑:

在输出中,我得到了“in showform 1”

0 投票
1 回答
33449 浏览

r - R 中的 parent.frame() 和 parent.env() 有什么区别;它们在引用调用中有何不同?

如果有人可以用一个简单的例子来说明这一点会很有帮助吗?

此外,在哪里使用parent.frame()而不是,parent.env()反之亦然。

0 投票
1 回答
192 浏览

f# - Why has the statement "printfn" in F# different name in VS2010 object browser?

I had know the difference between F# library and .NET library when I called their functions. But when I saw the statement "printfn" in VS 2010 object browser, I saw only the "public static T PrintFormatLine(... format)" instead of "printfn".

Why has the statement "printfn" in F# library different name in VS2010 object browser?

How can I call functions in F# library, if there aren’t documents for the F# library, because the names in VS 2010 object browser are totally different?

0 投票
1 回答
52 浏览

ajax - Firefox & AJAX oddity: DOM replacements not working again after just working

these are the two functions (externally loaded):

now here's the part that calls these functions. *notice that the replaceText() is called from within replaceImage()

okay. now here's the kicker: the FIRST replaceText() works fine in ALL browsers. the replaceImage() fails ONLY in Firefox which CONTAINS A CALL TO replaceText() that only JUST worked as advertised!! i could see how i might have screwed up the image replacement (even though i copy/pasted it from another working project that DOES replace the image in FF...so weird...), but i do NOT see how the replaceText() can fail: it just worked!

so: whaaaaat!? i'm thinking its some kind of scope issue, but i'm stumped as to why.

totally stumped. forehead really sore...

thank for your time and help. i'm praying this isn't something really retarded...

WR!

PS: i'm also confused why, if i remove the quotes from the element name in the replaceImage() call, it breaks; but it works in the replaceText() call without brackets just fine...

0 投票
3 回答
7937 浏览

jquery - jquery自调用函数循环

我正在尝试检查我的自调用 jquery 函数是否完成了工作,但发生的事情是结果在每次自调用时不断增加。

HTML

Javascript

通常,这是我的代码结果。

负载。

5 秒后

再过5秒

对不起,糟糕的解释。我一直在认真思考为什么会发生这些事情。如果有人能解释我做错了什么,或者解决方案。请帮助 - 这个问题一直困扰着我好几天。