Facebook JavaScript,图像选择器

发布于 2024-08-23 16:24:47 字数 306 浏览 3 评论 0原文

我/有许多从 facebook 相册图片动态打印的 img 标签,如下所示 -

echo '<'img src="' . $photo_detail['src_small'] . '" id="imageurl" onclick="return false" />';

我需要的是 - 当单击图像时,图像源应设置为 - <'input type=表单中的“hidden” id="imagesrc"/> 值 提交表单时,值也会提交 - 就像图像选择器一样

I/m having many img tag dynamically printed from facebook album pictures, like below-

echo '<'img src="' . $photo_detail['src_small'] . '" id="imageurl" onclick="return false" />';

I need is- When clicking on image the source of image is should set to- <'input type="hidden" id="imagesrc"/> value in the form
when submitting the form the value also submitted - like an image picker

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

§对你不离不弃 2024-08-30 16:24:47

要完成您需要的操作,您需要了解 Javascript 以及名为 FBJS 的 Facebook 自定义版本的 javascript(如果您正在构建 FBML 画布应用程序)。

如果您还没有深入了解如何在 Facebook 之外执行此操作,那么我建议您阅读一本关于 Javascript 的好书,直到您了解为止。

一旦您了解了如何在 Facebook 之外执行此操作,以下 wiki 页面应该是有关如何在 FBJS 中使用相同技术的良好指南:http://developers.facebook.com/docs/fbjs/

To do what you need you will need to have an understanding of Javascript as well as Facebook's custom version of javascript called FBJS (if you are building an FBML canvas application).

If you do not yet have a strong understanding of how to do this outside of Facebook then I recommend reading through a good book on Javascript until you do.

Once you understand how to do this outside of Facebook the following wiki page should be a good guide on how you can use the same technique with FBJS: http://developers.facebook.com/docs/fbjs/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文