Approaches of Communicating with Server-side in B/S applications

Methods used in client-side call server-side during B/S:

1, Directly call http://abc.com/       //click the link or key in url in browser

disadvantage: manually connect, not automatically


2, Use Form submit method        //var frm = document.getElementById("frm"); frm.submit();

disadvantage: will refresh the page.


3, Use Ajax call;                         //XMLHTTPRequest Object

disadvantage: cannot make cross-domain call.


4, Use the src property of dynamic script tag. //dynamic append script tag in html dom object. let server-side response javascript method. like Response.Write("alert('Hello');");
benefit: can call during cross-domain.

posted @ 2009-04-21 17:40  lp123  阅读(167)  评论(0编辑  收藏  举报