日期:2014-05-17 浏览次数:20853 次
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
//String isproxystr = request.getParameter("isproxy");
boolean isproxy = false;
session.setAttribute("Power",5);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'trhidden.jsp' starting page</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">    
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="This is my page">
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/trhidden.js"></script>
  </head>
  
  <body>  
  <table id="tt" border="1 red solid" > </table>
  </body>
</html>
function showtt(){
    $("#tt").html(
            '<tr <%=session.getAttribute("Power").equals(5)?"style=\'display:none\'":"" %> >'
            +'<td colspan="12" style="text-align: right"><input type="button" id="excel" value="excel" onclick="alert(\'haha\')"/></td>'
    +"</tr>"
    +"<tr>"
    +"<td>name</td><td>age</td><td>sax</td>"
    +"</tr>"
    +"<tr>"
    +"<td>tys</td><td>22</td><td>nan</td>"
    +"</tr>"
    
    ); 
}