我对javascript和jQuery都是陌生的.我正在开发一个页面,其中已从代码生成页面的整个html.在页面中,有一个用于发布消息的文本框,并且可以为每个消息发布评论.现在,当我发布新评论或删除评论时,我需要进行数据库调用. 我知道有两种方法可以从js中完成
I am new to both javascript and jQuery. I am developing a page in which I have generated page's whole html from code. In the page, there in a textbox to post messages and for each message comments can be posted. Now when I post a new comment or delete a comment I need to do database call. I know 2 method to do it from js
有人可以建议我哪种方法适合我的需求吗?
Can anybody suggest me which method will suite my requirement?
推荐答案每个浏览器都有自己的XmlHttpRequest实现.使用框架可以最大程度地减少跨浏览器差异和怪癖的麻烦,特别是如果您是新手.
Each browser has their own implementation of XmlHttpRequest. Using a framework will minimize the headache of cross-browser differences and quirks, especially if you are very new.
更多推荐
XmlHttpRequest与jQuery
发布评论