Cordova PHP返回原始页面 [英] Cordova PHP get back to the original page

查看:64
本文介绍了Cordova PHP返回原始页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用HTML CSS和JavaScript构建Cordova(intel XDk应用程序).对于后端,我使用PHP.我希望在php完成工作后,它将返回到我的应用程序中的特定页面,比方说#menupage.这是我的php代码:

I am building a Cordova ( intel XDk app ) with HTML CSS and JavaScript. For Backend i use PHP. I want that after the php finishes it's job, it will return to a specific page in my app, let's say #menupage. This is my php code:

    <?php
echo 'welcome ';
echo $_GET["name"];
echo 'your password is ';
echo  $_GET["password"];
echo '<button onclick="activate_page("#menupage");">Go to the menu</button>';
 ?>

我希望按钮激活该功能,但是不希望如此.我尝试的所有其他Javascript代码均无效.有人可以帮我吗.

I want the button to activate that function, but it doesn't. Every other Javascript code I try doesn't work. Can somebody help me please.

推荐答案

您使用了错误的引号顺序,请尝试正确分配并转义内部引号

you have a wrong sequnce of quotes try assign properly and escape the inner quotes

 echo '<button onclick="activate_page(\'#menupage\');">Go to the menu</button>';

这篇关于Cordova PHP返回原始页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆