页面注意格式


<%@ page language="java" pageEncoding="UTF-8"%>
<%@page import="com.web.utils.PropertiesReader"%>
<%@ include file="/commons/taglib.jsp"%>

<html>
	<head>
		<%@ include file="/commons/header.jsp"%>
		<script type="text/javascript"
			src="<%=request.getContextPath()%>/js/jquery.js">
</script>





taglib
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<c:if test="${!empty sessionScope.WW_TRANS_I18N_LOCALE}">
   <fmt:setLocale value="${sessionScope.WW_TRANS_I18N_LOCALE}" scope="session"/>
</c:if>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">





header
<%@ page language="java" pageEncoding="UTF-8"%>
<link rel="Stylesheet" href="<c:url value='/css/css3.css" type="text/css'/>"/>
<style media=print> 
.Noprint{display:none;}
</style>
<script type='text/javascript' src='<c:url value='/js/validate.js'/>'></script>
<script type='text/javascript' src='<c:url value='/js/WebCalendar.js'/>'></script>

<script type="text/javascript">
function highlightTableRows(tableId) {
    var previousClass = null;
    var table = document.getElementById(tableId); 
    var tbody = table.getElementsByTagName("tbody")[0];
    var rows;
    if (tbody == null) {
        rows = table.getElementsByTagName("tr");
    } else {
        rows = tbody.getElementsByTagName("tr");
    }
    for (i=0; i < rows.length; i++) {
        rows[i].onmouseover = function() {this.style.backgroundColor='#CCCC00'; previousClass=this.className;this.style.cursor="hand";this.className+=' over'};
        rows[i].onmouseout = function() {this.style.backgroundColor='#FFFFFF'; this.className=previousClass };
    }
}

function checkAll(){
    var handleEl=document.getElementById("checkAll");
    var els=document.getElementsByName("ids");
    for(i=0;i<els.length;i++){
        els[i].checked=handleEl.checked;
    }
}

function wait(){
document.all.flag.style.display="block";
}

function showView(url){
  var time =new Date();  
  window.open(url,
  "newwindow","height=700,width=900,top=10,left=100,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");
}

function GetRadioValue(RadioName){
    var obj;    
    obj=document.getElementsByName(RadioName);
    if(obj!=null){
        var i;
        for(i=0;i<obj.length;i++){
            if(obj[i].checked){
                return obj[i].value;            
            }
        }
    }
    return null;
}

function showPopup(){   
    var popUp = document.getElementById("popupcontent");   
    popUp.style.top = "50px";   
    popUp.style.left = "200px";
    popUp.style.width = "400px";   
    popUp.style.height = "200px";         
    popUp.style.visibility = "visible";
}

function showPopup(top,left,width,height){   
    var popUp = document.getElementById("popupcontent");   
    //popUp.style.top = top;   
    //popUp.style.left = left;
    var iTop = (window.screen.availHeight)/3; //获得窗口的垂直位置;
    var iLeft = (window.screen.availWidth)/4; //获得窗口的水平位置;
    popUp.style.top = iTop;   
    popUp.style.left = iLeft;
    popUp.style.width = width;   
    popUp.style.height = height;         
    popUp.style.display = "block";
}

function hidePopup(){   
    var popUp = document.getElementById("popupcontent");   
    popUp.style.display = "none";
}

function disableOcx(){
  var form = document.forms[0];
  for (var i = 0; i < form.length; ++i) {
     var element = form.elements[i];         
     if (element.name) {
       if (element.nodeName == "INPUT") {
         var type = element.type;
         if(type !='hidden'){
             element.disabled = true;
         }         
       }
       else if (element.nodeName == "SELECT") {
            element.disabled = true;
       }
       else if (element.nodeName == "TEXTAREA") {
            element.disabled = true;
       }
       }
  }  
}


  
//处理键盘事件 禁止后退键(Backspace)密码或单行、多行文本框除外
function banBackSpace(e){      
    var ev = e || window.event;//获取event对象      
    var obj = ev.target || ev.srcElement;//获取事件源      
       
    var t = obj.type || obj.getAttribute('type');//获取事件源类型     
       
    //获取作为判断条件的事件类型   
    var vReadOnly = obj.getAttribute('readonly');   
    var vEnabled = obj.getAttribute('enabled');   
    //处理null值情况   
    vReadOnly = (vReadOnly == null) ? false : vReadOnly;   
    vEnabled = (vEnabled == null) ? true : vEnabled;   
       
    //当敲Backspace键时,事件源类型为密码或单行、多行文本的,   
    //并且readonly属性为true或enabled属性为false的,则退格键失效   
    var flag1=(ev.keyCode == 8 && (t=="password" || t=="text" || t=="textarea")    
                && (vReadOnly==true || vEnabled!=true))?true:false;   
      
    //当敲Backspace键时,事件源类型非密码或单行、多行文本的,则退格键失效   
    var flag2=(ev.keyCode == 8 && t != "password" && t != "text" && t != "textarea")   
                ?true:false;           
       
    //判断   
    if(flag2){   
        return false;   
    }   
    if(flag1){      
        return false;      
    }      
}   
  
//禁止后退键 作用于Firefox、Opera   
document.onkeypress=banBackSpace;
//禁止后退键  作用于IE、Chrome   
document.onkeydown=banBackSpace;
</script>

你可能感兴趣的:(格式)