Ajax特效 动态树形列表 之三
数据库设计
本实例使用名为tree的数据库表,包含的数据如图1.8所示,具体的建表语句如下:
CREATE TABLE 'tree' (
'id' int(11) NOT NULL auto_increment,
'text' varchar(255) NOT NULL,
'isfolder' varchar(5) NOT NULL default 'false',
'link' varchar(255) default NULL,
'pid' int(11) NOT NULL default '0',
PRIMARY KEY ('id')
)
相关文档:
http://drupal.org/project/ajax_comments
AJAX Comments
View
CVS instructions
Modules · Content display
neochief - December 18, 2008 - 12:44
One of the most wanted Drupal modules :)
Module is now depends on Comments bonus API!
Features in 6.x:
Provides ajax comments to drupal sites. Feature ......
var xmlHttp;
function createXMLHttpRequestss() {
if (window.ActiveXObject) {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}else if (window.XMLHttpRequest) {
& ......
本实例使用名为faq的数据库表,包含的数据如图1.2所示。具体的创建数据表语句如下:
CREATE TABLE 'faq' (
'id' int(11) NOT NULL auto_increment,
'faq' varchar(255) NOT NULL,
'detail' varchar(255) NOT NULL,
PRIMARY KEY ('id')
)
图1.2 表faq包含的数据
主 ......
服务器端响应文件postalcode.jsp
服务器响应文件根据用户输入的邮政编码,从数据库中查询对应的地区信息。如果没有取到,则返回空字符串。
<%@ page contentType="text/plain; charset=UTF-8"%>
<%@ page language="java"%>
<%@ page import="java.sql.*,ajax.db.DBUtils"%>
<%!
......