简体   繁体   中英

How to Pass Values within HTML Div To PHP

I am developing a forum in php. I have made a " Reply With Quote " button under each post and When User Clicks this button, It runs a JQuery Function that gets the text of that post and Put It into the CKEditor and Wrap the Text with a Div having an id="quote" . The Text Looks like this after inserting to CKEditor

<div id="quote">This is the quoted Text"</div>  

Normally In Forums the Values are passed in quotes like this

[QUOTE=user_name;post_id]This is Quoted Text[/QUOTE]

But I am not using BBCode in my forum. So, How can I Pass user_name and post_id values within my <div id="quote"> to PHP??

在将该引号div插入页面之前,该按钮应运行ajax查询以将表单值传递给服务器。

在将div插入到页面中之前,使用Ajax添加一个隐藏字段,然后使用会话或cookie生成用户凭证

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM