当前位置: 动力学知识库 > 问答 > 编程问答 >

cakephp - Cake PHP: how can i pass dynamic arguments to ajax->link?

问题描述:

I have an $ajax->link that calls a controller action; it needs additional parameters contained in a hidden field, say

<div id=my_id>

How can i pass the value of my_id to the $ajax->link?

网友答案:

You need the PHP DOM - its a bit tricky but it does what you want:

PHP Parse HTML code

On the other hand - if you know a bit of JavaScript - you can do away with using the Ajax helper and write the link yourself.

分享给朋友:
您可能感兴趣的文章:
随机阅读: