Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/371.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 美元的JSF替代方案(document).ready_Javascript_Primefaces_Jsf 2.2 - Fatal编程技术网

Javascript 美元的JSF替代方案(document).ready

Javascript 美元的JSF替代方案(document).ready,javascript,primefaces,jsf-2.2,Javascript,Primefaces,Jsf 2.2,JSF对javascript $(document.ready() ? 我发现了,但似乎不一样。您可以使用Primefaces,在xhtml页面的头部,写下: <h:outputScript library="javax.faces" name="jsf.js" target="head" /> <h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />

JSF
javascript
$(document.ready()
?

我发现了
,但似乎不一样。

您可以使用Primefaces,在xhtml页面的头部,写下:

    <h:outputScript library="javax.faces" name="jsf.js" target="head" />
    <h:outputScript library="primefaces" name="jquery/jquery.js" target="head" />
    <h:outputScript library="primefaces" name="jquery/jquery-plugins.js" target="head" />


这个问题很奇怪。JSF是一个基于HTML表单应用程序的MVC框架,而不是另一个JavaScript库。您可以继续在JSF中使用jQuery。此外,jQuery已经内置到PrimeFaces中(您知道吗,这是一个基于jQuery的JSF组件库)。如果你仔细解释你的实际情况,你可能会有更多的机会得到答案,因为你错误地认为这个问题的答案是正确的解决方案。我的意思是,我想模拟我使用
$(document).ready()时的行为。例如,在页面加载后初始化一些自定义javascript。如果页面包含jsf/PrimeFaces组件,这是自动完成的