Recommended: Teach you 17 basic ASP programming typical codes 1. Method for ASP to obtain input data in table: GET POST 1.get: After the user adds the data to the URL, the format is "? Field 1=Input data 1&Field 2=Input data 2&..., and then send it to Server. For example: action is www.abc.c
When using AJAX to develop websites, friends often encounter garbled problems and it is difficult to find a solution at once. In fact, it is very simple to solve the problem of Chinese garbled by AJAX.
1. Server program:
| The following is the quoted content: <% liststr=AJAX Chinese garbled solution sponse.write escape(liststr) 'Encoding with escape %> 2. Client JAVASCRIPT program function toserver(url) { var req = new XMLHttpRequest(); if (req) { req.onreadystatechange = function() { if (req.readyState == 4 ) { if(req.status == 200 || req.status == 304) { getstr=unescape(req.responseText) 'Decode with unescape alert(getstr); } else {return false;} } } req.open('GET', url); req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8'); req.send(null); } } |
Share: Analyze the implementation method and code for dynamic addition of ASP application form A request form can contain N items, and when adding the request form, you need to dynamically add the code. Dynamic Table