douhuo1738 2014-01-29 17:06
浏览 30

多参数模型中的JQuery Mobile 1.4 $ _GET

I'm testing with Jquery Mobile 1.4

I've seen a lot of examples where data between php pages is passed in the URL, but this is always done with multiple php files, for example i have page1.php and a link in a jquery listview is:

<a href="page2.php?id=5">

So in page 2 we can $_GET["id"]

But if we have page2 in a subpage of page1.php, I don't know what is the recommended way of achieving this.

So for example what i want to do is something like have just 1 file called page1.php that will have something like:

<data-role = "page" id="page1">
<listview>
<li><a href=#page2?id=5">

<data-role="page" id="page2">
<?php $_GET["id"] ?>

Obviusly this is not working, but I hope you get the idea. I just want to use $_GET in the #page2, so I can have the id in a variable and use it for some php coding.

Is this possible? What is the recommended way to do this? I guess I'll have to use some javascript.

For the moment I am using multiple php files, but I have to do quite a lot of pages, so I would like to have less files if possible.

Thanks

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 微信会员卡等级和折扣规则
    • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
    • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
    • ¥15 gdf格式的脑电数据如何处理matlab
    • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
    • ¥100 监控抖音用户作品更新可以微信公众号提醒
    • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
    • ¥70 2048小游戏毕设项目
    • ¥20 mysql架构,按照姓名分表
    • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分