在 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 ( )