标签:page content lan eclips doctype body meta 乱码 har
JSP
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Insert title here</title> </head> <body> <!-- 1、浏览器中输出hello world --> hello world!<br/> <!-- 2、eclipse中console输出:3 --> <% int i = 3; System.out.println(3); %> <!-- 3、浏览器输出:3 --> <%=i %> <!-- 4、浏览器输出,但是中文乱码 --> <% out.print("你好"); %> <!-- 浏览器输出为:9 --> <%=k %> <%! int k=9; %> </body> </html>
标签:page content lan eclips doctype body meta 乱码 har
原文地址:https://www.cnblogs.com/hejh/p/11023635.html