ajaxÓëjsp »ñµÃ¿Õxml½â¾ö·½·¨
AjaxºÍjspµÄ¹ÖÏÖÏó
Èç¹ûÓÃAjaxÈ¥ÇëÇóÒ»¸öjspÒ³Ãæ£¬¸ÃjspÒ³Ãæ·µ»ØµÄÊÇxml£¨response.setContentType("text/xml; charset=GB2312");£©£¬²¢ÇÒ¸Ãjsp°üº¬ÏÂÃæÕâЩͷ@pageÖ¸ÁîµÄ»°£¬ÔòÔÚ¿Í»§¶Ëxml=XMLHttpRequest.responseXMLµÃµ½µÄÊÇÒ»¸ö²»°üº¬ÈÎÎñ¶«Î÷µÄxml¶ÔÏ󣬼´xml.childNodes.length½«»áÊÇ0.
<%@ page contentType="text/html; charset=GBK" %>
<%@ page import="com.suntek.notes.sql.DBGrid"%>
<%@ page import="java.util.Vector" %>
ÔÒòÊÇÒÔÉϵÄ@pageÖ¸Áî(ÆäʵÊÇÈκÎÒ»¸öÖ¸Áî)»á²úÉú¿ÕÐС£¼´ÔÚjspÀï±ßµÄout.print(xml)µ½¿Í»§¶ËµÄ֮ǰ£¬ÒѾÓпÕÐÐÊä³öÁË¡£½â¾ö°ì·¨¿ÉÒÔÊÇÈ¥µôÉÏÃæµÄÓï¾ä£¬»ò°Ñjsp¸ÄΪservlet
ͬʱ£¬jspÀï±ßµÄÈκοÕÐж¼ÓпÉÄܻᵼÖÂͬÑùµÄÎÊÌâ¡£
Ó¦¸ÃÓÃservlet½ÏºÃ¡£
Ïà¹ØÎĵµ£º
ÔÚ¿ª·¢ÏµÍ³Ê±£¬ÎÒÃǾ³£»áʹÓõ½xmlÃèÊöµÄÎļþ£¬ÎÒÃÇ»ù±¾²ÉÓÃÈçϼ¸ÖÖ·½Ê½½øÐнâÎö£º
1dom
DOM ÊÇÓÃÓëÆ½Ì¨ºÍÓïÑÔÎ޹صķ½Ê½±íʾ XML ÎĵµµÄ¹Ù·½ W3C ±ê×¼¡£DOM ÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐѰÕÒÌØ¶¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµºÍ¹¹Ôì²ã´Î½á¹¹£¬È»ºó² ......
1£©DOM£¨JAXP Crimson½âÎöÆ÷£©
DOMÊÇÓÃÓëÆ½Ì¨ºÍÓïÑÔÎ޹صķ½Ê½±íʾXMLÎĵµµÄ¹Ù·½W3C±ê×¼¡£DOMÊÇÒÔ²ã´Î½á¹¹×éÖ¯µÄ½Úµã»òÐÅϢƬ¶ÏµÄ¼¯ºÏ¡£Õâ¸ö²ã´Î½á¹¹ÔÊÐí¿ª·¢ÈËÔ±ÔÚÊ÷ÖÐѰÕÒ
ÌØ¶¨ÐÅÏ¢¡£·ÖÎö¸Ã½á¹¹Í¨³£ÐèÒª¼ÓÔØÕû¸öÎĵµºÍ¹¹Ôì²ã´Î½á¹¹£¬È»ºó²ÅÄÜ×öÈκι¤×÷¡£ÓÉÓÚËüÊÇ»ùÓÚÐÅÏ¢²ã´ÎµÄ£¬Òò¶øDOM±» ......
function editFormSubmit() {
var dataForm = Ext.getDom("dataForm");
var conn = new Ext.data.Connection({url:"edit.action"});
conn.request({
params:{
selectId: ......
½ñÌìѧ»áÁËÈçºÎ×Ô¼º±àд JSP ÓÃÀ´´¦Àí CKEditor µÄͼƬÉÏ´«¡£
<%@ page import="org.apache.commons.fileupload.FileItem" %>
<%@ page import="java.util.List" %>
<%@ page import="org.apache.commons.fileupload.disk.DiskFileItemFactory" %>
<%@ page import ......