我们正在开发一个服务器移动应用程序,目前还没有服务器端实现。
我想在Javascript MButton1JSClick事件中使用我自己的函数,如下面的代码所示:
问题是,我在哪里放置myFunction()的实际功能代码
<?php
require_once("rpcl/rpcl.inc.php");
//Includes
use_unit("jquerymobile/forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");
use_unit("jquerymobile/jmobile.inc.php");
//Class definition
class MPage1 extends MPage
{
public $MButton1 = null;
function MButton1JSClick($sender, $params)
{
?>
//begin js
myFunction();
//end
<?php
}
}
global $application;
global $MPage1;
//Creates the form
$MPage1=new MPage1($application);
//Read from resource file
$MPage1->loadResource(__FILE__);
//Shows the form
$MPage1->show();
?>
非常感谢任何帮助,谢谢。