linusz 2013-03-08
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <link rel="stylesheet" type="text/css" href="../css/default/om-default.css"> <script src="${pageContext.request.contextPath}/js/jquery.min.js"></script> <script src="${pageContext.request.contextPath}/js/operamasks-ui.min.js"></script> <script type="text/javascript" > $(document).ready(function() { $('#mytable').omGrid({ height : 250, width : 600, limit : 10, //分页显示,每页显示8条 singleSelect : false, //出现checkbox列,可以选择同时多行记录 colModel : [ {header:'编号',name:'id', width:100, align : 'center'}, {header:'地区',name:'city', width:250, align : 'left',wrap:true}, {header:'地址',name:'address', width:'autoExpand',renderer:function(value,rowData,rowIndex){ return '<b>'+value+'</b>'; }} ], dataSource : 'griddata.do?method=fast' //后台取数的URL }); }); </script> <title>一个简单的panel</title> </head> <body> <table id="mytable"></table> </body> </html>
还是对DOCTYPE理解不够深刻
原来是:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
是由eclipse自动生成的,但是不支持CSS
请看:http://www.w3school.com.cn/tags/tag_doctype.asp
对于:<meta http-equiv="X-UA-Compatible" content="IE=edge" /> 兼容IE8的参数 请看:http://blog.sina.com.cn/s/blog_5b5460eb0100vgg4.html
DOCTYPE为:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
修改DOCTYPE为<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
之后: