下面选项中,用于设置浏览器显示文本采用UTF-8编码的是 ( )
A: response.setHeader("Content-Type","text/html;charset=utf-8");
B: request.setHeader("Content-Type","text/html;charset=utf-8");
C: response.setHeader("Content-Type"," charset=utf-8");
D: request.setHeader("Content-Type"," charset=utf-8");
A: response.setHeader("Content-Type","text/html;charset=utf-8");
B: request.setHeader("Content-Type","text/html;charset=utf-8");
C: response.setHeader("Content-Type"," charset=utf-8");
D: request.setHeader("Content-Type"," charset=utf-8");
举一反三
- 下面关于设置编码格式得语法正确的是()。 A: <meta charset="UTF-8"> B: <meta charset="UTF-8" http-equiv="Content-Type"content="text/html;charset="UTF-8"/> C: 以上都错误 D: <meta http-equiv="Content-Type" content="text/html; charset="UTF-8"/>
- 下面关于设置HTML5编码格式的语法正确的是()。 A: <meta http-equiv="Content-Type" content="text/html; charset="UTF-8"/> B: <meta charset="UTF-8"> C: <meta charset="UTF-8"http-equiv="Content-Type"content="text/html;charset="UTF-8"/> D: 以上都错误
- 在JSP中,假设表单的method="post",在发送请求时,对于中文乱码处理的正确做法是( ) A: request.setCharacterEncoding("utf-8"); B: response.setCharacter("utf-8"); C: request.setContentType("text/html;charset=utf-8"); D: response.setContentType("text/html;charset=utf-8");
- 用户使用POST方式提交的数据中存在汉字(使用utf-8字符集),在Servlet中需要使用下述______语句处理。 A: response.setCharacterEncoding("utf-8"); B: request.setCharacterEncoding("utf-8); C: response.setContentType("text/html;charset=utf-8"); D: request.setContentType("text/html;charset=utf-8");
- 在HTML页面中,调用外部样式表的正确格式是 A: <link rel="stylesheet" type="text/css" href="外部样式表地址" /> B: <style rel="stylesheet" type="text/css" link="外部样式表地址" /> C: <style rel="stylesheet" type="text/css" href="外部样式表地址" /> D: <link rel="stylesheet" type="text/css" style="外部样式表地址" />