在ZK框架中,我想在zul文件中调用javascript函数,但它不会发生。
<a label="Click" onClick="popUp();">
我也有popUp()函数。但是当我点击
<script type="text/javascript">
function createPopUp(url)
{
var w = 600;
var h = 500;
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
window.open(url,'name','scrollbars=yes,width='+w+', height='+h+', top='+top+', left='+left);
}
</script>
但是,当我点击该链接时,它显示以下错误:
Sourced file: inline evaluation of: `` popUp();'' :
Command not found: popUp() : at Line: 13 :
in file: inline evaluation of: `` popUp();'' : popUp ( )