douwen8118 2008-12-17 18:38
浏览 223
已采纳

是否可以使用PHP的ID更改HTML元素属性?

I want to do something like this:

page A has a link to page B
page B gets content from a database and processes it
the result from page B is displayed on a div in page A

Please notice that I don't want to leave page A while page B processes the information of the database.

What I'm really trying to do is avoid using frames in the site, and I want to make the pages appear in a div. Is this possible?

I'm guessing its kinda of a newbie question, but it's really bugging me and i don't even know where to start looking.

  • 写回答

8条回答 默认 最新

  • doukuanyong1939 2008-12-17 18:43
    关注

    You want AJAX!

    AJAX will do that, but the steps will be a little different from what you describe

    • page A has a link that calls a javascript function
    • the javascript function makes an AJAX call to page B which gets content from a database and processes it
    • the result from page B is returned to the javascript function
    • page a displays it in a div
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(7条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度