AJAX加载的内容以及如何交互
我一直在学习有关使用 PHP 的 AJAX 的更多信息,并想询问加载的内容与加载到的页面的关系。
我一直在使用在“dynamicdrive”中找到的 AJAX 分页脚本 v1.2.2。我能够按预期正确实现动态页面加载并且它有效。我加载的页面中包含我希望能够添加超链接的图像。这些链接会使用类似的函数(可能是 ajax 函数 .load() )更改原始页面上的内容,
出于某种原因,我似乎无法从加载的内容中引用原始页面上的对象来执行任何工作。我注意到,当我在页面上“查看源代码”时,我只看到原始页面,而不是加载的内容。我一直在寻找可以用来确定原始页面和加载内容之间如何交互的任何内容。 “加载”的内容是子页面吗?我看到很多对 iframe 等的引用,但我知道这不是我正在使用的方法。
任何有关这些页面的关系以及它们之间如何交互的建议将不胜感激。
谢谢,
银
I have been learning more about AJAX using PHP and wanted to ask about the relationship of loaded content to the page itis loaded into.
I have been using the AJAX Pagination script v1.2.2 i found at "dynamicdrive". I was able to properly implement the dynamic page load as expected and it works. The pages I load have images in them that i'd like to be able to add hyperlinks to. These links would change content on the original page with a similar function ( perhaps the ajax function .load() )
for some reason I can't seem to reference the objects on the original page fromt he loaded content to do any work. I noticed that when i "view source" on the page, I only see the original page and not the loaded content. I have been searching for anything I can use to determine how to interact between the original page and the loaded content. Is the "loaded" content a child page? i see a lot of references out there to iframes etc, but I know that this is not the method i'm using.
Any suggestions on the ralationship of these pages and how to interact betweent hem would be greatly apprecaited.
Thanks,
Silver
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我可以回答你问题的一部分 - 要查看源代码,请尝试使用 Firefox 扩展 - 开发人员工具栏,它允许您查看“生成的源代码”。
或者,如果您在任何浏览器中使用元素选择器,它会显示生成的源。
I can answer one part of your question - to view the source, try using Firefox extension - Developers tool bar, which allows you to view the 'Generated source'.
Or if you use element selector in any browser, it will show you the generated source.