开发者

Return value from query statement - jQuery

I have a ajax, jquery form which works fine, but returning a message from <div></div>. I want to return a value from a db query, a single value.

How do I go about doing it.

开发者_如何学Python

Thanks Dave


As far as I know you can return your result in any form you want. I used to return my result as formatted html and then used that as the innerHTML for a div. It all depends on how you process your result I guess.

For your situation, just return your result as an ordinary string (e.g. echo $result in your php backend code). Then you could cast/convert the value to whatever form you want in your javascript/jquery frontend.

I hope I understood your question right

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜