创建jQuery无限循环

创建jQuery无限循环,jquery,Jquery,我试图在jQuery中创建一个无限循环。我知道基本语法是 $(document).ready(function(){ function helloworld() { alert("hello, world!"); helloworld(); } }); 。。。但这没有任何作用。我该怎么做?谢谢 while (1) { alert("hello, world!"); } 使用此选项,这将警告无限时间这也是无限函数:D $(document).ready(function(){

我试图在jQuery中创建一个无限循环。我知道基本语法是

$(document).ready(function(){
 function helloworld() {
    alert("hello, world!");
helloworld();
}
});
。。。但这没有任何作用。我该怎么做?谢谢

while (1) {
    alert("hello, world!");
}

使用此选项,这将警告无限时间

这也是无限函数:D

$(document).ready(function(){
 function helloworld() {
    alert("hello, world!");
    helloworld();
}
helloworld();
});
function myfn() {
    console.log("hello, there!");
    myfn();
}
myfn();

只需使用helloworld()调用函数;然后开始无限循环。谢谢-这是我一直在尝试的-忘记正确键入它。所以问题一定出在我的内部功能上——我将创造一个新的问题。。。