2011-05-27

使用jQuery來include網頁

使用jQuery把遠端的網頁include進來,可以匯入靜態網頁html,也可以匯入動態網頁jsp,還可以下參數parameter。



原網頁和被匯入的網頁兩邊的編碼要一致,建議用UTF-8。
被匯入的動態網頁jsp要加上,匯入才不會亂碼
<%@ page language="java" contentType="text/html; charset=UTF-8" 
pageEncoding="UTF-8" %>

被匯入的靜態網頁html要加上,匯入才不會亂碼
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

沒有留言:

張貼留言