??xml version="1.0" encoding="utf-8" standalone="yes"?>婷婷综合缴情亚洲狠狠尤物,亚洲成人动漫在线观看,亚洲视频欧洲视频http://www2.blogjava.net/songfei/category/4998.htmlE序--人生--哲学___________________Ƣ迎艛_的加?/description>zh-cnMon, 28 May 2007 00:33:01 GMTMon, 28 May 2007 00:33:01 GMT60|页上打印方面的资料http://www.tkk7.com/songfei/articles/119707.html天外飞仙天外飞仙Thu, 24 May 2007 05:37:00 GMThttp://www.tkk7.com/songfei/articles/119707.htmlhttp://www.tkk7.com/songfei/comments/119707.htmlhttp://www.tkk7.com/songfei/articles/119707.html#Feedback0http://www.tkk7.com/songfei/comments/commentRss/119707.htmlhttp://www.tkk7.com/songfei/services/trackbacks/119707.html                                <input type="button" name="SubmitPrevious" class="btnSet" value="打印" onClick="btPrint('6','printId,pageInfoId');">
                                <input type="button" name="SubmitPrevious" class="btnSet" value="预览" onClick="btPrint('7','printId,pageInfoId');">
                                <input type="button" name="SubmitPrevious" class="btnSet" value="讄" onClick="btPrint('8','printId,pageInfoId');">
                                <input type="button" name="btnSet" class="btnSet" value="导到Excel" onClick="saveToExcel('dataTable','人口职业构成人员名单');">
                                <input type="button" name="SubmitPrevious" class="btnSet" value="关闭" onClick="window.close();">
                                </div>
<body topmargin="0" leftmargin="0" onLoad="loadWebBrowser();">
览器的安全U别调低

天外飞仙 2007-05-24 13:37 发表评论
]]>
|页上动态添加控?动态实?http://www.tkk7.com/songfei/articles/99421.html天外飞仙天外飞仙Mon, 12 Feb 2007 04:37:00 GMThttp://www.tkk7.com/songfei/articles/99421.htmlhttp://www.tkk7.com/songfei/comments/99421.htmlhttp://www.tkk7.com/songfei/articles/99421.html#Feedback0http://www.tkk7.com/songfei/comments/commentRss/99421.htmlhttp://www.tkk7.com/songfei/services/trackbacks/99421.html/**
 * File Name  : familyinfo.js
 * Description   : This is the js file for familyinfo
 * Copyright   : Copyright (s) 2006
 * Company   : sfsafe.
 * Author           : chenpeng
 */
 
var newRow=new FamilyMember();
var MainProblemCount=-1;
var MainProblemIndex=-1;
var FamilyMemberIndex=-1;

//定义家庭成员c?br />function FamilyMember() {

 this.familyno="";
 this.name="";
 this.pid="";
 this.relationcode="";
 this.sex="";
 this.birthday="";
 this.education="";
 this.vocational="";
 this.marriage="";
 this.nflag="";
 
}

//在家庭成员查询结果中获取一行的?br />function getRowValue(tablename,index,nflag)
{
 newRow.name=document.getElementById(tablename).rows[index].cells[0].innerText;
 newRow.pid=document.getElementById(tablename).rows[index].cells[1].innerText;
 newRow.relationcode=document.getElementById(tablename).rows[index].cells[2].innerText;
 newRow.sex=document.getElementById(tablename).rows[index].cells[3].innerText;
 newRow.birthday=document.getElementById(tablename).rows[index].cells[4].innerText;
 newRow.education=document.getElementById(tablename).rows[index].cells[5].innerText;
 newRow.vocational=document.getElementById(tablename).rows[index].cells[6].innerText;
 newRow.marriage=document.getElementById(tablename).rows[index].cells[7].innerText;
 newRow.nflag=nflag;
 opener.insertNewMember('FamilyMemberTable',newRow);
 
}

//在家庭成员列表中d一?br />function insertRowToFamilyMember(tablename,FamilyMember) {
 
 var lastRowIndex=document.getElementById(tablename).rows.length;
  FamilyMemberIndex++;
 var insertButton="<input type='button' name='Submit2324' value='详细' onClick=\"viewMemberInfo('"+cTrim(FamilyMember.name)+"','"+cTrim(FamilyMember.pid)+"','"+cTrim(FamilyMember.nflag)+"');\"/>";
  insertButton=insertButton+"&nbsp;<input type='button' name='delFamilyMember' value='删除' onClick=\"deleteFamilyMemberRow('FamilyMemberTable',this.parentNode.parentNode.rowIndex);\"/>";
 var hiddenPid="<input type='hidden' name='newFamilyMemberList["+FamilyMemberIndex+"].pid' value='"+cTrim(FamilyMember.pid)+"' />" ;
 var hiddenName="<input type='hidden' name='newFamilyMemberList["+FamilyMemberIndex+"].name' value='"+cTrim(FamilyMember.name)+"' />" ;
 var selectRelation="<select name='newFamilyMemberList["+FamilyMemberIndex+"].relationcode' id='FamilyMember"+FamilyMemberIndex+"'></select>";
 var hiddenSex="<input type='hidden' name='newFamilyMemberList["+FamilyMemberIndex+"].sex' value='"+cTrim(FamilyMember.sex)+"' />" ;
 var hiddenBirthday="<input type='hidden' name='newFamilyMemberList["+FamilyMemberIndex+"].birthday' value='"+cTrim(FamilyMember.birthday)+"' />" ;
 var hiddenMarriage="<input type='hidden' name='newFamilyMemberList["+FamilyMemberIndex+"].marriage' value='"+cTrim(FamilyMember.marriage)+"' />" ;
 var hiddenNflag="<input type='hidden' name='newFamilyMemberList["+FamilyMemberIndex+"].nflag' value='"+cTrim(FamilyMember.nflag)+"' />" ;
 
 var row=document.getElementById(tablename).insertRow(lastRowIndex);
 
 var cell0=row.insertCell(0);
 var cell1=row.insertCell(1);
 var cell2=row.insertCell(2);
 var cell3=row.insertCell(3);
 var cell4=row.insertCell(4);
 var cell5=row.insertCell(5);
 var cell6=row.insertCell(6);
 var cell7=row.insertCell(7);

 cell0.className='TableStyle_L';
 cell1.className='TableStyle';
 cell2.className='TableStyle';
 cell3.className='TableStyle';
 cell4.className='TableStyle';
 cell5.className='TableStyle';
 cell6.className='TableStyle';
 cell7.className='TableStyle_R';

 cell0.innerHTML=FamilyMember.name+hiddenName;
 cell1.innerHTML=FamilyMember.pid+hiddenPid;
 cell2.innerHTML=selectRelation;
 cell3.innerHTML=FamilyMember.sex+hiddenSex;
 cell4.innerHTML=FamilyMember.birthday+hiddenBirthday;
 cell5.innerHTML=FamilyMember.marriage+hiddenMarriage;
 cell6.innerHTML="";
 cell7.innerHTML=insertButton+hiddenNflag;
 
 var source = document.getElementById("relationcode");
 var desc = document.getElementById("FamilyMember"+FamilyMemberIndex);
 desc.options.length=source.options.length;
 for (var i = 0; i < desc.options.length; i++) {
  desc.options[i].value = source.options[i].value;
  desc.options[i].text = source.options[i].text;
 }
}

 //删除指定表格中指定行
function deleteRow(tablename,index)
{

 document.getElementById(tablename).deleteRow(index);
 
}

 //隐藏指定表格中指定行
function hiddenRow(tablename,index)
{

 document.getElementById(tablename).rows[index].style.display = "none";

}

function insertRowToMainProblem(tablename) {

 var insertButton="<input type='button' name='Submit232' value='删除' onClick=\"deleteMainProblemRow('MainProblemTable',this.parentNode.parentNode.rowIndex);\"/>";
 var lastRowIndex=document.getElementById(tablename).rows.length;
 var row=document.getElementById(tablename).insertRow(lastRowIndex);
  MainProblemCount=MainProblemCount+lastRowIndex;
  MainProblemIndex=parseInt(MainProblemIndex)+1;
 var cell0=row.insertCell(0);
 var cell1=row.insertCell(1);
 var cell2=row.insertCell(2);
 var cell3=row.insertCell(3);
 
 cell0.className='TableStyle_L';
 cell1.className='TableStyle';
 cell2.className='TableStyle';
 cell3.className='TableStyle_R';
 
 cell0.innerHTML="<input type='text' name='newMainProblemList["+MainProblemIndex+"].happendate' id='happendate"+MainProblemCount+"' Class='textInput' size='10' readonly='true'/>"+
 "<img  style='cursor:hand' onclick=\"calendar(this,document.getElementById('happendate"+MainProblemCount+"'),'yyyy-mm-dd');\" height=16 src='image/datetime.gif' alt='日期' width=16 border=0 >";
 cell1.innerHTML="<input type='text' name='newMainProblemList["+MainProblemIndex+"].solvedate' id='solvedate"+MainProblemCount+"' Class='textInput' size='10' readonly='true'/>"+
 "<img  style='cursor:hand' onclick=\"calendar(this,document.getElementById('solvedate"+MainProblemCount+"'),'yyyy-mm-dd');\" height=16 src='image/datetime.gif' alt='日期' width=16 border=0 >";
 cell2.innerHTML="<select name='newMainProblemList["+MainProblemIndex+"].problemname' id='familyMainProblem"+MainProblemCount+"'></select>";
 cell3.innerHTML=insertButton;
 var source = document.getElementById("MainProblem");
 var desc = document.getElementById("familyMainProblem"+MainProblemCount);
 desc.options.length=source.options.length;
 
 for (var i = 0; i < desc.options.length; i++) {
  desc.options[i].value = source.options[i].value;
  desc.options[i].text = source.options[i].text;
 }

}

function cTrim(sInputString)
{
 return sInputString.replace(/^\s+|\s+$/g, "");
}


//以下部分为地址做?/p>

 var countyInit = false;
 var streetInit = false;
 var villageInit = false;
 var groupInit = false;
 
 function setAddr() {
    
   var param = document.forms[0].elements("city").value;
   changeProvince(param);
 }
   
 function postProcessReadyStateChanged(httpRequest, param) {
  if (httpRequest.readyState == RS_COMPLETE) {
   if (param[0] == document.forms[0].elements("condition.city") && !countyInit) {
    countyInit = true;
    param = document.forms[0].elements("county").value;
    
    changeCity(param);
   }
   if (param[0] == document.forms[0].elements("condition.county") && !streetInit) {
    streetInit = true;
    param = document.forms[0].elements("street").value;
    
    changeCounty(param);
   }
   if (param[0] == document.forms[0].elements("condition.street") && !villageInit) {
    villageInit = true;
    param = document.forms[0].elements("village").value;
    
    changeStreet(param);
   }
   if (param[0] == document.forms[0].elements("condition.village") && !groupInit) {
    groupInit = true;
    
    param = document.forms[0].elements("group").value;
   
    changeVillage(param);
   }
  }
 }
   
 function changeProvince(param) {
  var desc = new Array();
  desc[0] = document.forms[0].elements("condition.city");
  desc[1] = document.forms[0].elements("condition.county");
  desc[2] = document.forms[0].elements("condition.street");
  desc[3] = document.forms[0].elements("condition.village");
  desc[4] = document.forms[0].elements("condition.addgroup");
  var sqlId = "selectAddr";
  var sqlParam = new Array();
  var sqlVal = document.forms[0].elements("condition.province").value;
  sqlVal= sqlVal == "" ? "AA" : sqlVal;
  sqlParam[0] = new SqlParam("parentCode",sqlVal );
  linkage(desc, sqlId, sqlParam,param);
 }
   
 function changeCity(param) {
  var desc = new Array();
  desc[0] = document.forms[0].elements("condition.county");
  desc[1] = document.forms[0].elements("condition.street");
  desc[2] = document.forms[0].elements("condition.village");
  desc[3] = document.forms[0].elements("condition.addgroup");
  var sqlId = "selectAddr";
  var sqlParam = new Array();
  var sqlVal = document.forms[0].elements("condition.city").value;
  sqlVal= sqlVal == "" ? "AA" : sqlVal;
  if(param =="undefined"){
   sqlVal=document.forms[0].elements("city").value;
  }
     sqlParam[0] = new SqlParam("parentCode", sqlVal);
  linkage(desc, sqlId, sqlParam,param);
 }
 function changeCounty(param) {
  var desc = new Array();
  desc[0] = document.forms[0].elements("condition.street");
  desc[1] = document.forms[0].elements("condition.village");
  desc[2] = document.forms[0].elements("condition.addgroup");
  var sqlId = "selectAddr";
  var sqlParam = new Array();
  var sqlVal = document.forms[0].elements("condition.county").value;
  sqlVal= sqlVal == "" ? "AA" : sqlVal;
  if(param =="undefined"){
   sqlVal=document.forms[0].elements("county").value;
  }
  sqlParam[0] = new SqlParam("parentCode",sqlVal );
  linkage(desc, sqlId, sqlParam,param);
 }
 function changeStreet(param) {
  var desc = new Array();
  desc[0] = document.forms[0].elements("condition.village");
  desc[1] = document.forms[0].elements("condition.addgroup");
  var sqlId = "selectAddr";
  var sqlParam = new Array();
  var sqlVal = document.forms[0].elements("condition.street").value;
  sqlVal= sqlVal == "" ? "AA" : sqlVal;
  if(param =="undefined"){
   sqlVal=document.forms[0].elements("street").value;
  }
  sqlParam[0] = new SqlParam("parentCode", sqlVal);
  linkage(desc, sqlId, sqlParam,param);
 }
 
 function changeVillage(param) {
  var desc = new Array();
  desc[0] = document.forms[0].elements("condition.addgroup");
  var sqlId = "selectAddr";
  var sqlParam = new Array();
  var sqlVal = document.forms[0].elements("condition.village").value;
  sqlVal= sqlVal == "" ? "AA" : sqlVal;
  if(param =="undefined"){
   sqlVal=document.forms[0].elements("street").value;
  }
  sqlParam[0] = new SqlParam("parentCode", sqlVal);
  linkage(desc, sqlId, sqlParam,param);
 }
 
 function getAddrCode(){
   
  province = document.forms[0].elements("condition.province").value;
  city = document.forms[0].elements("condition.city").value;
  county = document.forms[0].elements['condition.county'].value;
  street = document.forms[0].elements['condition.street'].value;
  village = document.forms[0].elements['condition.village'].value;
  group = document.forms[0].elements['condition.addgroup'].value;
  if(group!=""){
   document.forms[0].elements("condition.addrCode").value = group;
   return;
  }
  if(village!=""){
   document.forms[0].elements("condition.addrCode").value = village;
   return;
  }
  if(street!=""){
   document.forms[0].elements("condition.addrCode").value = street;
   return;
  }
  if(county!=""){
   document.forms[0].elements("condition.addrCode").value = county;
   return;
  }
  if(city!=""){
   document.forms[0].elements("condition.addrCode").value = city;
   return;
  }
  if(province!=""){
   document.forms[0].elements("condition.addrCode").value = "33";
   return;
  }else {
   document.forms[0].elements("condition.addrCode").value = "";
   return;
  }
 }


//JS for AJAX 应用于家庭成员的q出
HTTPRequest = function () {
   var xmlhttp=null;
   try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
   } catch (_e) {
      try {
         xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
       } catch (_E) {
       xmlhttp = false;
       }
   }
   if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
     try {
        xmlhttp = new XMLHttpRequest();
     } catch (e) {
        xmlhttp = false;
   }  }
   return xmlhttp;
}

function moveoutFamilyMemberAjax(url) {
   var request_url = "/jxhealth/queryfamilymember.do?";
   request_url=request_url+url;
   var http = new HTTPRequest();
      http.open("GET", request_url, true);
   http.onreadystatechange = function (){ handleHttpResponse(http)};
   http.send();
}

function handleHttpResponse(http) {
}


/************************************/

<%@ page pageEncoding="GBK" contentType="text/html; charset=GBK"%>
<%@ taglib prefix="bean" uri="/WEB-INF/struts-bean.tld"%>
<%@ taglib prefix="html" uri="/WEB-INF/struts-html.tld"%>
<%@ taglib prefix="logic" uri="/WEB-INF/struts-logic.tld"%>
<%@ taglib prefix="jxh" uri="/WEB-INF/jxhealth.tld"%>
<html>
<head>
<title>家庭档案-家庭成员d</title>
  <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
  <link rel="stylesheet" href="<%=request.getContextPath()%>/image/style.css" type="text/css" />
<style type="text/css">
<!--
.TableStyle {
 height:30;
 text-align:center;
 border-top-style:none;
 border-bottom-style:none;
 border-left-style:none;
 border-right-color:#FFFFFF;
}
.TableStyle2 TR {
 background-color:expression((this.sectionRowIndex%2==0)?"#DDEEFF":"#FFFFFF")
}
.TableStyle_L {
 height:25;
 text-align:center;
 border-top-style:none;
 border-bottom-style:none; 
 border-right-color:#FFFFFF;
}
.TableStyle_R {
 height:25;
 text-align:center;
 border-top-style:none;
 border-bottom-style:none;
 border-left-style:none;
}
-->
</style>
<script src="<%=request.getContextPath()%>/familyinfo/familyinfo.js" type="text/javascript"></script>
<script src="<%=request.getContextPath()%>/js/linkage.js" type="text/javascript"></script>
<script language="javascript">

//查询家庭成员信息
function searchs()
{
 document.forms[0].processCategory.value = "queryFamilyMember";
 document.forms[0].submit();
}

function moveOutFamilyMember(familyno,pid,name)
{
 document.forms[0].processCategory.value = "moveOutFamilyMember";
 document.forms[0].elements("familymemberCondition.familyno").value = familyno;
 document.forms[0].elements("familymemberCondition.moveoutpid").value = pid;
 document.forms[0].elements("familymemberCondition.moveoutname").value = name;
 event.srcElement.disabled='disabled';
 document.forms[0].submit();
}
function addRowToMain(tablename,index,nflag)
{
 getRowValue(tablename,index,nflag);
 event.srcElement.disabled='disabled';
}

</script>
</head>

<body topmargin="0" leftmargin="0">

<html:form action="/queryfamilymember">

<html:hidden property="processCategory" />
<html:hidden property="familymemberCondition.familyno"/>
<html:hidden property="familymemberCondition.moveoutpid"/>
<html:hidden property="familymemberCondition.moveoutname"/>
<bean:define id="familyNoBean" name="FAMILYNO"></bean:define>
<table width="962" align="center" height="207"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="962" align="center" valign="top">
  <table width="99%" height="5"  border="0" cellspacing="0" cellpadding="0">
    <tr>
   <td></td>
    </tr>
  </table>
  <table width="100%" height="206"  border="0" cellpadding="0" cellspacing="0">
    <tr>
   <td>
    <table class="RightTop" border="0" cellspacing="0" cellpadding="0">
      <tr>
     <td class="l"></td>
     <td class="m" align="center"><a style="color:#FFFFFF; text-decoration:none">家庭成员查询</a></td>
     <td class="r"></td>
      </tr>
    </table>
    <table class="RightTOPT" width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
     <td class="l"><img src="<%=request.getContextPath()%>/image/Right_MM_L.gif" width="7" height="25"></td>
     <td class="m">&nbsp;</td>
     <td class="r"></td>
      </tr>
     </table>
    <table class="RightMiddle" width="100%"  border="0" cellspacing="0" cellpadding="0">     
      <tr>
     <td class="l"></td>
     <td height="100" align="center" valign="top" class="m">
     <table width="915" border="0" cellpadding="0" cellspacing="0">
      <tr>
         <td class="msgFont" align="left" valign="bottom">
          <html:messages id="msgs" message="true">
        <LI><bean:write name="msgs" /></LI>
       </html:messages>
         </td>
        </tr>
     </table>
     <table width="915" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#31558c">
                      <tr>
                        <th width="907" colspan="9" ><table width="100%" align=center border="0" cellpadding="0" cellspacing="0"  style=" border-bottom:  hidden 0 PX solid ">
                            <tr>
                              <td width="120" height="30" align="center" style="color:#507dc2">姓名Q?</td>
                              <td width="197" align="left">
         <html:text name="FamilyMemberForm" property="familymemberCondition.name" size="18" maxlength="18" style="width:140px; height:15px" styleClass="textInput" errorStyle="background-color:red" />
         </td>
                              <td width="205" align="center" style="color:#507dc2">w䆾证号码:</td>
                              <td width="205" align="center">
         <html:text name="FamilyMemberForm" property="familymemberCondition.pid" size="18" maxlength="18" style="width:140px; height:15px" styleClass="textInput" errorStyle="background-color:red" />
         </td>
                              <td width="180" align="center">
                              <input type="button" name="submitbtn" value="查询"  class="btnSet" onClick="searchs();"/>
                              <input type="button" name="closebtn" value="关闭"  class="btnSet" onClick="window.close();"/>
                              </td>
                            </tr>
       <tr>
                              <td width="120" height="10" align="center" style="color:#507dc2"></td>
                              <td width="197" align="left"></td>
                              <td width="205" align="center" style="color:#507dc2"></td>
                              <td width="205" align="center"></td>
                              <td width="180" align="center"></td>
                            </tr>       
       <tr>
         <td colspan="5">
        
<logic:greaterThan name="FamilyMemberForm" property="pageInfo.totalPage" value="0">

            <table width="884" border="0" align="center" cellpadding="3" cellspacing="0" bordercolor="#31558c">
          <tr>
            <td width="170" height="30" align="left" style="color:#507dc2"><strong>家庭成员信息一览表</strong></td>
            <td width="702" colspan="6" align="right" style="color:#507dc2"><span class="f14 alignright mt5">每页
 <html:select property="pageInfo.pageSize">
 <html:option value="10"> 10 </html:option>
 <html:option value="30"> 30 </html:option>
 <html:option value="50"> 50 </html:option>
 <html:option value="100"> 100 </html:option>
 </html:select>
条记?br />          &nbsp;排序方式
                                  <label>
<html:select property="sortKey">
<html:option value="name">姓名</html:option>
<html:option value="pid">w䆾证号</html:option>
</html:select>
                                  <input type="button" name="SubmitShow" class="btnSet" value="再显C? onClick="searchs();"/>
                                  </label>
            </span></td>
            </tr>
          <tr>
                              <td height="30" align="left" style="color:#507dc2" colspan="9">
<table id="FamilyMemberList" width="873" border="1" align="center" cellpadding="3" cellspacing="0" class="TableStyle2">
                      <tr style="font-size:12px;background-color:#507dc2">
                        <th width="77" height="30" align="center" style="color:#FFFFFF; border-right-color: #A6BEFF;border-bottom-style:none">姓名</th>
                        <th width="106" align="center" style="color:#FFFFFF; border-right-color: #A6BEFF; border-bottom-style:none; border-left-style:none">w䆾证号</th>
                        <th width="108" align="center" style="color:#FFFFFF; border-right-color: #A6BEFF; border-bottom-style:none; border-left-style:none">家庭~号</th>
                        <th width="30" align="center" style="color:#FFFFFF; border-right-color: #A6BEFF; border-bottom-style:none; border-left-style:none">性别</th>
                        <th width="98" align="center" style="color:#FFFFFF; border-right-color: #A6BEFF; border-bottom-style:none; border-left-style:none">出生日期</th>
                        <th width="77" align="center" style="color:#FFFFFF; border-right-color: #A6BEFF; border-bottom-style:none; border-left-style:none">文化E度</th>
                        <th width="77" align="center" style="color:#FFFFFF; border-right-color: #A6BEFF; border-bottom-style:none; border-left-style:none">职业</th>
                        <th width="40" align="center" style="color:#FFFFFF; border-right-color: #A6BEFF; border-bottom-style:none; border-left-style:none">婚姻</th>
                        <th width="102" align="center" style="color:#FFFFFF;border-bottom-style:none; border-left-style:none">&nbsp;</th>
                      </tr>
      
<logic:iterate id="element" name="FamilyMemberForm" property="familymemberList" indexId="index">
      
                      <tr>
                        <td height="25" align="center" class="TableStyle_L">
<bean:write name="element" property="name" />
      </td>
                        <td height="25" align="center" class="TableStyle">
<bean:write name="element" property="pid" />
      </td>
                        <td height="25" align="center" class="TableStyle">
<bean:write name="element" property="familyno" />
      </td>
                        <td height="25" align="center" class="TableStyle">
<bean:write name="element" property="sex" />
      </td>
                        <td height="25" align="center" class="TableStyle">
<bean:write name="element" property="birthday" />
      </td>
                        <td height="25" align="center" class="TableStyle">
<bean:write name="element" property="education" />
      </td>
                        <td height="25" align="center" class="TableStyle">
<bean:write name="element" property="vocational" />
      </td>
                        <td height="25" align="center" class="TableStyle">
<bean:write name="element" property="marriage" />
      </td>
                        <td height="25" align="center" class="TableStyle_R">
<logic:notEqual name="element" property="familyno" value="<%=(String)familyNoBean %>">
<logic:empty name="element" property="familyno">
<input type="button" name="Submit32224" value="d" onClick="addRowToMain('FamilyMemberList',this.parentNode.parentNode.rowIndex,'<bean:write name="element" property="nflag" />');"/>
</logic:empty>
<logic:notEmpty name="element" property="familyno">
<logic:notEqual name="element" property="mflag" value="1">
<input type="button" name="Submit32224" value="d" disabled="disabled"/>
</logic:notEqual>
<logic:equal name="element" property="mflag" value="1">
<input type="button" name="Submit32224" value="d" onClick="addRowToMain('FamilyMemberList',this.parentNode.parentNode.rowIndex,'<bean:write name="element" property="nflag" />');"/>
</logic:equal>
</logic:notEmpty>
<logic:empty name="element" property="familyno">
<input type="button" name="Submit32223" value="q出" disabled="disabled"/>
</logic:empty>
<logic:notEmpty name="element" property="familyno">
<logic:equal name="element" property="relationcode" value="01">
<input type="button" name="Submit32223" value="q出" onClick="javascript:alert('此h是户?不能q出');"/>
</logic:equal>
<logic:notEqual name="element" property="relationcode" value="01">
<logic:equal name="element" property="mflag" value="1">
<input type="button" name="Submit32223" value="q出" disabled="disabled"/>
</logic:equal>
<logic:notEqual name="element" property="mflag" value="1">
<input type="button" name="Submit32223" value="q出"
onClick="moveOutFamilyMember('<bean:write name="element" property="familyno" />','<bean:write name="element" property="pid" />','<bean:write name="element" property="name" />');"/>
</logic:notEqual>
</logic:notEqual>
</logic:notEmpty>
</logic:notEqual>

<logic:equal name="element" property="familyno" value="<%=(String)familyNoBean %>">
<logic:equal name="element" property="mflag" value="1">
<input type="button" name="Submit32224" value="d" onClick="addRowToMain('FamilyMemberList',this.parentNode.parentNode.rowIndex,'<bean:write name="element" property="nflag" />');"/>
</logic:equal>
<logic:notEqual name="element" property="mflag" value="1">
<input type="button" name="Submit32224" value="d" disabled="disabled"/>
</logic:notEqual>
<input type="button" name="Submit32223" value="q出" disabled="disabled"/>
</logic:equal>
      </td>
                      </tr>
      
</logic:iterate>

            </table>
         <table align="center" width="100%" border="0" cellpadding="0" cellspacing="0">
             <tr>
               <td align="right" style="color:#31558c;font-size:12px" height="30">
                 <jxh:pageInfo formIndex="0" />
                 </td>
             </tr>
           </table>
         </td>
                            </tr>
         
          </table>
         
</logic:greaterThan>
         
         </td>
       </tr>
                        </table></th>
                      </tr>
                    </table>
     </td>
     <td class="r"></td>
      </tr>
    </table>
    <table class="RightDOWN" width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
     <td class="l"></td>
     <td class="m"><img src="<%=request.getContextPath()%>/image/Right_D_C.gif" width="3" height="6"></td>
     <td class="r"></td>
      </tr>
    </table>
   </td>
    </tr>
   </table>
 </td>
  </tr>
</table>

</html:form>

</body>
</html>



天外飞仙 2007-02-12 12:37 发表评论
]]>
|页上动态添加控?静?http://www.tkk7.com/songfei/articles/99408.html天外飞仙天外飞仙Mon, 12 Feb 2007 04:19:00 GMThttp://www.tkk7.com/songfei/articles/99408.htmlhttp://www.tkk7.com/songfei/comments/99408.htmlhttp://www.tkk7.com/songfei/articles/99408.html#Feedback0http://www.tkk7.com/songfei/comments/commentRss/99408.htmlhttp://www.tkk7.com/songfei/services/trackbacks/99408.html<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk">

<link rel="stylesheet" type="text/css" id="css" href="./css.css">
<script language="javascript" type="text/javascript" src="datepicker/WdatePicker.js"></script>
<link href="datepicker/default/datepicker.css" rel="stylesheet" type="text/css">

<SCRIPT language="JavaScript">
<!--
function addOneLine() {   
        var newTable=document.getElementById("LineTable");
        var newRow = newTable.insertRow();

 oneCell = newRow.insertCell(0);
        oneCell.innerHTML = "<p><select name=\"begin1\"><option value=\"0\">0</option><option value=\"1\">1</option><option value=\"2\">2</option><option value=\"3\">3</option><option value=\"4\">4</option><option value=\"5\">5</option><option value=\"6\">6</option><option value=\"7\">7</option><option value=\"8\">8</option><option value=\"9\" selected=\"true\">9</option><option value=\"10\">10</option><option value=\"11\">11</option><option value=\"12\">12</option><option value=\"13\">13</option><option value=\"14\">14</option><option value=\"15\">15</option><option value=\"16\">16</option><option value=\"17\">17</option><option value=\"18\">18</option><option value=\"19\">19</option><option value=\"20\">20</option><option value=\"21\">21</option><option value=\"22\">22</option><option value=\"23\">23</option></select><select name=\"begin2\"><option value=\"0\">00</option><option value=\"30\">30</option></select>---<select name=\"end1\"><option value=\"0\">0</option><option value=\"1\">1</option><option value=\"2\">2</option><option value=\"3\">3</option><option value=\"4\">4</option><option value=\"5\">5</option><option value=\"6\">6</option><option value=\"7\">7</option><option value=\"8\">8</option><option value=\"9\">9</option><option value=\"10\">10</option><option value=\"11\">11</option><option value=\"12\">12</option><option value=\"13\">13</option><option value=\"14\">14</option><option value=\"15\">15</option><option value=\"16\">16</option><option value=\"17\" selected=\"true\">17</option><option value=\"18\">18</option><option value=\"19\">19</option><option value=\"20\">20</option><option value=\"21\">21</option><option value=\"22\">22</option><option value=\"23\">23</option></select><select name=\"end2\"><option value=\"0\">00</option><option value=\"30\" selected=\"true\">30</option></select></p>";
        oneCell.className="datath"

        oneCell = newRow.insertCell(1);
        oneCell.innerHTML = "<select name=\"workType\"><option value=\"1\">开?lt;/option><option value=\"2\">学习</option><option value=\"3\">讨论</option></select>";
        oneCell.className="datath"

 oneCell = newRow.insertCell(2);
        oneCell.innerHTML = "<input name=\"textfield\" type=\"text\" size=\"35\" />";
        oneCell.className="datath"
       

 oneCell = newRow.insertCell(3);
        oneCell.innerHTML = "<input type=\"button\" name=\"btn13\" value=\"删除\" class=\"button\" onmouseover=\"this.className=\'button_hover\'\" onclick=\"delOneLine(this);\" onmouseout=\"this.className=\'button\'\" />";
        oneCell.className="datath"
       
    }

    function delOneLine(obj) {
        if ( confirm("认要删除吗Q?) ) {

            var mytable1 = self.document.all.LineTable;
            mytable1.deleteRow(obj.parentNode.parentNode.rowIndex);

        }
        return false;
    }
//-->
</SCRIPT>
</head>

<body style="margin:5px!important;margin:3px;">
<div id="position">
默认面
</div>
<div class="pannel">
 <div class="title">日报</div>
 <div class="subtitle">
<form name="form1">  
<div class="tabber" id="mytabber1" style="text-align:center; margin-bottom:5px;">
       
<div class="tabbertab" style="background-color:#2D73AC; width:98%">
            <table width="100%" border="0" cellspacing="1" cellpadding="0" style="padding-left:2px;" id="LineTable">
              <tr style="background-color:white;">
                <th width="39%" class="datath">工作旉<input name="text2223" type="text" class="Wdate" onfocus="new WdatePicker(this)" value="2007-01-01"/></th>
                <th class="datath" width="10%">工作cd</th>
                <th class="datath" width="39%">工作内容</th>
  <th class="datath">
  <input type="button" name="btn12" value="添?? class="button" onclick="addOneLine();" onmouseover="this.className='button_hover'" onmouseout="this.className='button'" /></th>
              </tr>
              <tr style="background-color:white;">
                <th class="datath" align="left"><p>
                  <select name="select">
                  <option value="0">0</option>
                  <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
                  <option value="8">8</option>
      <option value="9" selected="true">9</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
      <option value="16">16</option>
      <option value="17">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
      <option value="21">21</option>
      <option value="22">22</option>
      <option value="23">23</option>
                  </select><select name="select2">
                  <option value="1">00</option>
      <option value="2">30</option>
                  </select>---<select name="select3">
                  <option value="0">0</option>
                  <option value="1">1</option>
      <option value="2">2</option>
      <option value="3">3</option>
      <option value="4">4</option>
      <option value="5">5</option>
      <option value="6">6</option>
      <option value="7">7</option>
                  <option value="8">8</option>
      <option value="9">9</option>
      <option value="10">10</option>
      <option value="11">11</option>
      <option value="12">12</option>
      <option value="13">13</option>
      <option value="14">14</option>
      <option value="15">15</option>
      <option value="16">16</option>
      <option value="17" selected="true">17</option>
      <option value="18">18</option>
      <option value="19">19</option>
      <option value="20">20</option>
      <option value="21">21</option>
      <option value="22">22</option>
      <option value="23">23</option>
                  </select><select name="select4">
                  <option value="1">00</option>
      <option value="2"  selected="true">30</option>
                  </select></p>
                </th>
                <th class="datath" align="left">
                      <select name="workType">
<option value="1">开?lt;/option>
<option value="2">学习</option>
<option value="3">讨论</option>
                      </select></th>
                <th class="datath" align="left">
                  <input name="textfield" type="text" size="35" /></th>
                  <th class="datath" align="left">
   <input type="button" name="btn13" value="删除" class="button" onmouseover="this.className='button_hover'" onclick="delOneLine(this);" onmouseout="this.className='button'" /></th>
              </tr>
            </table>
        </div>
   </div>
   <div style="padding-top:5px; padding-bottom:10px; vertical-align: middle; text-align:center;">
    <input type="button" name="btn122" value="?? class="button" onmouseover="this.className='button_hover'" onmouseout="this.className='button'" />
  </div>
 </form>
  </div>
 <div class="clearboth"></div>
</div>
<div class="pannel">
 <div class="title">查询</div>
 <div class="subtitle">
 <form name="form1">
   <div style="float:right; padding-right:10px; vertical-align: middle;">
 <select name="s1">
  <option selected="selected">日期范围</option>
  <option>一?lt;/option>
  <option>两周</option>
  <option>一?lt;/option>
  <option>一?lt;/option>
  <option>半年</option>
  <option>一q?lt;/option>
 </select>
 <input name="text222" type="text" class="Wdate" onfocus="new WdatePicker(this)" value="2007-01-01"/>
 -
 <input name="text2222" type="text" class="Wdate" onfocus="new WdatePicker(this)" value="2007-01-01"/>
 <input type="button" name="btn1" value="查询" class="button" onMouseOver="this.className='button_hover'" onMouseOut="this.className='button'" />
   </div>
 </form>
 </div>
<div style="text-align:center; margin-bottom:5px;">
 <div style="background-color:#2D73AC; width:98%">
<table width="100%" border="0" cellspacing="1" cellpadding="0" style="padding-left:2px;">
  <tr  style="background-color:white;">
    <th width="20%" class="datath">序号</th>
    <th width="30%" class="datath">日期</th>
    <th class="datath">日报内容</th>
  </tr>
  <tr  style="background-color:white;">
    <td>00000001</td>
    <td>2007-02-02</td>
    <td>软g开?lt;/td>
  </tr>
  <tr  style="background-color:white;">
    <td>00000001</td>
    <td>2007-02-02</td>
    <td>学习JAVA</td>
  </tr>
  <tr  style="background-color:white;">
    <td>00000001</td>
    <td>2007-02-02</td>
    <td>&nbsp;</td>
  </tr>
  <tr style="background-color:white;">
    <td>00000001</td>
    <td>2007-02-02</td>
    <td valign="bottom">&nbsp;</td>
  </tr>
  <tr style="background-color:white;">
    <td>00000001</td>
    <td>2007-02-02</td>
    <td valign="bottom">&nbsp;</td>
  </tr>
  <tr style="background-color:white;">
    <td>00000001</td>
    <td>2007-02-02</td>
    <td valign="bottom">&nbsp;</td>
  </tr>
  <tr style="background-color:white;">
    <td>00000001</td>
    <td>2007-02-02</td>
    <td valign="bottom">&nbsp;</td>
  </tr>
  <tr style="background-color:white;">
    <td>00000001</td>
    <td>2007-02-02</td>
    <td valign="bottom">&nbsp;</td>
  </tr>
  <tr style="background-color:white;">
    <td>00000001</td>
    <td>2007-02-02</td>
    <td valign="bottom">&nbsp;</td>
  </tr>
  <tr style="background-color:white;">
    <td>00000001</td>
    <td>2007-02-02</td>
    <td valign="bottom">&nbsp;</td>
  </tr>
</table>
 </div>
</div>
 <div class="page">|&lt; &lt;&lt; 1 2 3 4 5 6 7 8 9 10 &gt;&gt; &gt;|
  
 </div>
 <div class="clearboth"></div>
</div>

</body>
</html>



天外飞仙 2007-02-12 12:19 发表评论
]]>
目ȝ(JS)汇?/title><link>http://www.tkk7.com/songfei/articles/99406.html</link><dc:creator>天外飞仙</dc:creator><author>天外飞仙</author><pubDate>Mon, 12 Feb 2007 04:15:00 GMT</pubDate><guid>http://www.tkk7.com/songfei/articles/99406.html</guid><wfw:comment>http://www.tkk7.com/songfei/comments/99406.html</wfw:comment><comments>http://www.tkk7.com/songfei/articles/99406.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/songfei/comments/commentRss/99406.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/songfei/services/trackbacks/99406.html</trackback:ping><description><![CDATA[ <p> <br />var RESET_PWD="666666";<br />var BTN_DIV_MARGIN_WIDTH = 10;<br />var DIV_BTN_HEIGHT = 50;<br />var DIV_BTN_WIDTH = 70;<br />var state=false;<br />function setTitle() { <br /> //top.document.title = document.title;<br />}<br />//面跌{共通方?br />function Go(url, name){<br /> var form = document.getElementById("JumpForm");<br /> form.action=url;<br /> form.target=name; <br /> form.submit();<br />}</p> <p>setTitle();<br />//全?取消<br />//checkAll(comId,flag)<br />//         comId 代表控g的名U?br />//         flag  调用Ҏ一?为全选状?为取消状?调用ҎcheckAll("checkbox1","1")<br />//               调用Ҏ二时 flag 没有用处          <br />function checkAll(comId,flag)<br />{<br />  var blnFlag=false;   <br />  var a=document.getElementsByName(comId);<br />  var n=a.length;<br />  if(flag=='1'||flag=='0'){<br />   if(flag=='1'){<br />   blnFlag=true;<br />    }<br />    if(n>0){<br />     for(var i=0;i<n;i++){<br />    a[i].checked=blnFlag;   <br />     }<br />    }<br />  }else{    <br />    //var b=document.getElementsByName(flag);   <br />       if(n>0){<br />    for(var i=0;i<n;i++){<br />   a[i].checked=window.event.srcElement.checked;   <br />    }<br />   }<br />  }<br />}</p> <p>//加蝲IE打印lg<br />//loadWebBrowser();</p> <p>//打印预览函数<br />//   strType 操作cdQ?是打华ͼ7是打印预览,8是打印页面设|?br />//   strIds  要隐藏或昄的页面ID字符Ԍ其ID之间?Q?分割<br />function btPrint(strType,strIds){<br /> //Web.ExecWB(4,1) 保存|页<br /> //wb.ExecWB(6,1) 打印<br /> //wb.ExecWB(7,1) 打印预览<br /> //wb.ExecWB(8,1) 打印面讄<br /> //wb.ExecWB(10,1) 查看面属?br /> //wb.ExecWB(15,1) 好像是撤销Q有待确?br /> //wb.ExecWB(17,1) 全?br /> //wb.ExecWB(22,1) h<br /> //wb.ExecWB(45,1) 关闭H体无提C?br /> <br />    //昄面元素 <br /> idDisplay("none",strIds) <br /> wb.ExecWB(strType,1);<br /> //昄面元素<br /> idDisplay("block",strIds)<br /> <br />}</p> <p>//ID隐藏昄<br />function idDisplay(strStyleType,strIds){<br /> if(strIds!=""){<br />  var strIdAarry=strIds.split(",");<br />  for(var i=0;i<strIdAarry.length;i++){<br />   var strId=document.all(strIdAarry[i]);<br />   strId.style.display=strStyleType;       <br />  }<br /> }<br />}</p> <p>//加蝲IE打印lg<br />function loadWebBrowser(){<br /> var wbId= '<OBJECT ID=\"wb\" name=\"wb\" WIDTH=0 HEIGHT=0 CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></OBJECT>';<br />    document.body.insertAdjacentHTML('beforeEnd',wbId);   <br />}</p> <p>//××××××××××U联地址框提C处理×××××××××××××?/p> <p>//定义 select 原?br />//var oldValue,oldText,<br />var oldSelectedIndex;<br />//select下拉框的onkeydown事gQ修改下拉框的?br />function catch_keydown(sel)<br />{<br /> switch(event.keyCode)<br /> {<br /> case 13: //回R?br />  event.returnValue = false;<br />  break;<br /> case 27: //Esc?br />  //sel.options[sel.selectedIndex].text = oldText;<br />  //sel.options[sel.selectedIndex].value = oldValue;<br />  sel.selectedIndex = oldSelectedIndex;<br />  event.returnValue = false;<br />  break;<br /> case 8: //I格?br />  var s = sel.options[sel.selectedIndex].text;<br />  s = s.substr(0,s.length-1);<br />  if (sel.options[sel.selectedIndex].value==sel.options[sel.selectedIndex].text)<br />  {<br />   sel.options[sel.selectedIndex].value=s;<br />   sel.options[sel.selectedIndex].text=s;<br />  }<br />  event.returnValue = false;<br />  break;<br /> }<br /> if (!event.returnValue && sel.onchange)<br />  sel.onchange(sel)<br />}</p> <p>//select下拉框的onkeypress事gQ修改下拉框的?br />function catch_press(sel){<br /> if(sel.selectedIndex>=0){<br /> var s = sel.options[sel.selectedIndex].text + String.fromCharCode(event.keyCode);<br /> if (sel.options[sel.selectedIndex].value==sel.options[sel.selectedIndex].text)<br /> {<br />  sel.options[sel.selectedIndex].value=s;<br />  sel.options[sel.selectedIndex].text=s;<br /> }<br /> event.returnValue = false;<br /> if (!event.returnValue && sel.onchange)<br />  sel.onchange(sel)<br /> }<br />}</p> <p>//select下拉框的onfocus事gQ保存下拉框原来的?br />function catch_focus(sel) {<br />// oldText = sel.options[sel.selectedIndex].text;<br />// oldValue = sel.options[sel.selectedIndex].value;<br /> oldSelectedIndex = sel.selectedIndex;<br />}</p> <p>//恢复select下拉列表当前选中的?br />function LoadSelect(obj,value)<br />{<br /> for (var i=0; i< obj.options.length; i++)<br /> if (obj.options[i].value == value)<br /> {<br />  obj.selectedIndex = i;<br />  break;<br /> }<br />}</p> <p>function adjustDivPos(div) {<br /> with(div) {<br />     style.display = "";<br />  style.left = document.body.scrollLeft+event.clientX + 16;<br />  style.top = document.body.scrollTop +event.clientY;<br /> }<br /> <br /> //document.body.scrollIntoView=document.body.scrollTop +event.clientY;<br />}</p> <p>//select 选择框鼠标上UL提示选择的内?br />function selMouseOver(obj)<br />{<br />   state=!state;<br />   var DivRef = document.getElementById('div_hint');<br />   var IfrRef = document.getElementById('DivShim');<br /> <br /> if(IfrRef==null){<br />  IfrRef = document.createElement('iframe');<br />  IfrRef.style.display = "none";<br />  IfrRef.style.position = "absolute";<br />  IfrRef.setAttribute('id','DivShim');<br />  document.body.appendChild(IfrRef);<br /> }<br /> <br />   if(state)<br />   {<br />    with (DivRef)<br /> {<br />  innerText = obj.options[obj.selectedIndex].text;<br />  if (innerText.length > 0)<br />  {<br />   innerText = " " + innerText + " ";<br />   style.display = "block";   <br />   style.left = document.body.scrollLeft+event.clientX + 16;<br />   style.top = document.body.scrollTop +event.clientY;<br />  }<br /> }<br />    DivRef.style.display = "block";<br />    IfrRef.style.width = DivRef.offsetWidth;<br />    IfrRef.style.height = DivRef.offsetHeight;<br />    IfrRef.style.top = DivRef.style.top;<br />    IfrRef.style.left = DivRef.style.left;<br />    IfrRef.style.zIndex = DivRef.style.zIndex - 1;<br />    IfrRef.style.display = "block";<br />   }</p> <p>}</p> <p>//select 选择框鼠标移开时消?br />function selMouseOut(obj)<br />{<br />   document.getElementById('div_hint').style.display = "none";<br />   document.getElementById('DivShim').style.display = "none";<br />}</p> <p>//初始化页面BtnDiv<br />function initBtnDiv(div, btnNum) {<br /> div.style.display = "none";<br /> adjustDivWidth(div,btnNum);<br />}</p> <p>//ҎDiv内的内容调整昄宽度<br />function adjustDivWidth(div, btnNum) {<br /> <br /> var NoneDispBtnNum = 0;<br /> var buttons = div.getElementsByTagName("input");<br /> <br /> for (i=0;i<buttons.length;i++) {<br /> <br />  if (buttons[i].style.display == "none" && buttons[i].type == "button") {<br />   NoneDispBtnNum = NoneDispBtnNum + 1;<br />  }<br /> <br /> }<br /> <br /> var divWidth = div.style.width;<br /> var width = divWidth.substr(0, divWidth.length-2);<br /> <br /> //div.style.width = width - (parseInt(div.style.width) - BTN_DIV_MARGIN_WIDTH * 2) / btnNum * NoneDispBtnNum;<br /> div.style.width = (btnNum - NoneDispBtnNum) * DIV_BTN_WIDTH + BTN_DIV_MARGIN_WIDTH * 2;<br />    div.style.height = DIV_BTN_HEIGHT;<br />}<br />//q回q龄DOPTION<br />function getOptions(strBari){<br />    var strValue="";<br />    var strLable="";<br />    if(strBari==""){<br />     document.write("<option selected value=''>----</option>");<br />    }else{<br />     document.write("<option value=''>----</option>");<br />    }<br />    if(strBari=='0-1'){<br />     document.write("<option selected value='0-1'>0?</option>");<br />    }else{<br />     document.write("<option value='0-1'>0?</option>");<br />    }<br />    if(strBari=='1-5'){<br />     document.write("<option selected value='1-5'>1?</option>");<br />    }else{<br />     document.write("<option value='1-5'>1?</option>");<br />    }    <br />    for(var i=1;i<=16;i++){<br />     strValue=i*5+"-"+(i+1)*5;<br />     strLable=i*5+"?+(i+1)*5;<br />     if(i==16){<br />      if(strBari=="80"){     <br />       document.write("<option selected value='80'>80以上</option>");<br />      }else{<br />       document.write("<option value='80'>80以上</option>");<br />      }<br />     }else{<br />      if(strBari==strValue){     <br />       document.write("<option selected value='"+strValue+"'>"+strLable+"</option>");<br />      }else{<br />       document.write("<option value='"+strValue+"'>"+strLable+"</option>");<br />      }<br />     }<br />    } <br />}<br />   <br />   //昄生成的层及IFROM<br />   //strModle="" OR "1" 是数据查?br />   //strModle="2" 是报?br />   function Fun_showSearch(strModle){     <br />      var strType="1";<br />      if(strModle=="undefined"||strModle==""){<br />      }else{<br />        strType=strModle;<br />      }<br />      // 生成DIV<br />      var s=window.document.createElement("DIV"); <br />      s.id="divFrm";<br />      s.name="divFrm";      <br />      s.style.position="absolute";<br />      s.style.left=(window.screen.width-600)/2+"px" ;<br />      s.style.top=(window.screen.height)/2+15+"px";      <br />      s.style.width="300px";<br />      s.style.height="40px";<br />      s.style.border="black 0px solid";<br />      //s.style.backgroundColor="red";<br />      s.style.zIndex=10000;      </p> <p>      // 生成iframe<br />     var f=document.createElement("IFRAME");<br />     f.name="frmDiv";<br />     f.id="frmDiv";      <br />     f.width=s.style.width;    <br />     f.height=s.style.height;<br />     f.scrolling="no";<br />     f.frameBorder=0;     <br />     f.style.zIndex=s.style.zIndex-1;<br />     f.src="javascript:false;";<br />     // 附加f到s<br />     s.appendChild(f);</p> <p>     // 昄s<br />    document.body.appendChild(s);<br />    <br />    // 创徏?br />    var t=document.createElement("DIV");   <br />    t.name="divShowFind";<br />    t.id="divShowFind";<br />    t.style.visibility="visible";    <br />    t.style.position="absolute";<br />    t.style.left=s.style.left;<br />    t.style.top=s.style.top;<br />    t.style.width=s.style.width;<br />    t.style.height=s.style.height;<br />    t.style.border="solid 1px #FF5706";   <br />    //t.style.backgroundColor="blue";<br />    t.style.zIndex=s.style.zIndex+1;<br />    <br />    var strMsgTxt="pȝ提示Q数据正在请求之中,L?;   <br />    if(strType=="1"){<br />       strMsgTxt="pȝ提示Q数据正在查询之中,L?;<br />    }else if(strType=="2"){<br />       strMsgTxt="pȝ提示Q数据正在上传之中,L?;       <br />    }else if(strType=="3"){<br />       strMsgTxt="pȝ提示Q数据正在生成之中,L?;<br />    }else{<br />       strMsgTxt="pȝ提示Q数据正在请求之中,L?;<br />    }<br />    <br />    // 定义要显C的内容<br />    var tableTxt="<table width=\"100%\" height=\"100%\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#ffffff\">"<br />        tableTxt=tableTxt+"<tr><td align=\"center\" style=\"color:red;font-size:9pt\">"<br />        tableTxt=tableTxt+strMsgTxt+"<img src='/jxhealth/image/waiting.gif' onerror=\"if (!this.times){this.times=1;};if (this.times<=10){src='/jxhealth/image/waiting.gif';this.times++}else{}\">";<br />        tableTxt=tableTxt+"</td>";<br />        //tableTxt=tableTxt+"<td width=15 align=\"center\" style=\"color:red;font-size:9pt\"><font style='cursor:hand' onclick='closeDiv()'>×</font></td>";<br />        tableTxt=tableTxt+"</tr></table>";<br />    t.innerHTML =tableTxt;</p> <p>    // 昄?br />    document.body.appendChild(t);<br />    // 循环按钮置Z可用<br />    var a = document.all;<br />    for(var i=0; i<a.length; i++){<br />     if(a[i].type=="button"||a[i].type=="reset"){<br />            a[i].disabled=true;<br />        }<br />    }<br />  <br />   }<br />   <br />   //关闭?br />   function closeDiv(){     <br />     var objDiv1=document.getElementById('divFrm'); <br />     objDiv1.removeNode(true); <br />     var objDiv2=document.getElementById('divShowFind');     <br />     objDiv2.removeNode(true);     <br />     var a = document.all;<br />     for(var i=0; i<a.length; i++){<br />     if(a[i].type=="button"||a[i].type=="reset"){<br />          a[i].disabled=false;          <br />        }<br />     }<br />   }<br />   <br />   //按钮变灰<br />   function buttonDisabled(){    <br />     var a = document.all;<br />     for(var i=0; i<a.length; i++){<br />     if(a[i].type=="button"||a[i].type=="reset"){<br />          a[i].disabled=true;          <br />        }<br />     }<br />   }<br />   //键盘回R事g转化为tab事g<br />   //text中的Readonly不进入焦?br />   //radio中的checked=false不进入焦?br />   function movetoNext(){<br />     if(event.keyCode==13){//当按回R的时?br />      try{<br />       if(document.activeElement.type=="textarea"){//当运到是textarea时不跛_下一个组?br />        if(document.activeElement.readOnly==true){//只读的话p下去<br />         event.keyCode=9;<br />        }<br />        return true;<br />       }else{<br />        if (event.srcElement.type == "button"){<br />         event.keyCode=9;<br />           if(event.srcElement.value == "查询" || event.srcElement.value == "保存" || event.srcElement.value == "下一? || event.srcElement.value == "d" ){//|| event.srcElement.value == "编?<br />               <br />               event.srcElement.onclick();<br />           }<br />        }else{<br />         <br />         var nextIndex=getItemIndex();<br />         if (document.all.item(nextIndex).type == "text" || document.all.item(nextIndex).type == "textarea"){<br />          if(document.all.item(nextIndex).readOnly==true){<br />          <br />           getNextIndex(nextIndex);<br />          }else{<br />           event.keyCode=9;<br />          }<br />          //getNextItem();<br />         }else{//下一个不是text<br />          if(document.all.item(nextIndex).disabled==true){<br />           getNextIndex(nextIndex); <br />          }else{<br />           if(document.all.item(nextIndex).type=="radio"){<br />            //document.all.item(nextIndex).focus();<br />            ///*每一个radio都进入焦?br />            if(document.all.item(nextIndex).checked==true){<br />             event.keyCode=9;<br />            }else{<br />             getNextIndex(nextIndex);<br />            }<br />            //*/<br />           }else{<br />            event.keyCode=9;<br />           }<br />           <br />          }<br />         <br />         }<br />        }<br />       }<br />      }catch(e){<br />       alert("未知异常");<br />       event.keyCode=9<br />      }<br />      return true;<br />     }else{<br />         return false;<br />     }<br />   }<br />   <br />  <br />  function getItemIndex(){<br />   var index;//当前的sourceIndex<br />    var nextIndex;//下一个sourceIndex<br />    index=window.event.srcElement.sourceIndex;<br />    index+=1;<br /> with   (document.all){   <br />          var   aTab   =   new   Array(length); <br />          for   ( var i=index;i<length;i++)   { <br />    <br />            if(item(i).type=="text" || item(i).type=="textarea" || item(i).type=="checkbox" || item(i).type=="radio" || (item(i).type=="select" && item(i).disabled==false ) || ( item(i).type=="select-one"  && item(i).disabled==false ) ){<br />            <br />               nextIndex   =   item(i).sourceIndex;   <br />               break;<br />             }<br />          }   <br />      }   <br />   return nextIndex;<br />  }<br />  function getNextIndex(argindex){<br />   <br />    var index;//当前的sourceIndex<br />    var nextIndex;//下一个sourceIndex<br />    index=document.all.item(argindex).sourceIndex;<br />    index+=1;<br /> with   (document.all){   <br />          var   aTab   =   new   Array(length);   <br />          for   (var i=index;i<length;i++)   { <br />            if(item(i).type=="text" || item(i).type=="textarea" || item(i).type=="checkbox" || item(i).type=="radio" || (item(i).type=="select" && item(i).disabled==false ) || ( item(i).type=="select-one"  && item(i).disabled==false ) ){<br />            <br />               nextIndex   =   item(i).sourceIndex;   <br />               break;<br />             }<br />          }   <br />      }   <br />      <br />   if (document.all.item(nextIndex).type == "text" || document.all.item(nextIndex).type == "textarea"){<br />   <br />     if(document.all.item(nextIndex).readOnly==true){<br />      getNextIndex(nextIndex); <br />  }else{<br />     document.all.item(nextIndex).focus();<br />  }<br />   }else{<br />     if(document.all.item(nextIndex).type==undefined){<br />      event.keyCode=9;<br />     }<br />     if(document.all.item(nextIndex).disabled==true){<br />      getNextIndex(nextIndex); <br />     }else{ <br />      if(document.all.item(nextIndex).type=="radio"){<br />       if(document.all.item(nextIndex).checked==true){<br />        document.all.item(nextIndex).focus();<br />       }else{<br />        getNextIndex(nextIndex);<br />       }<br />      }else{<br />       document.all.item(nextIndex).focus();<br />      }<br />     }<br />   }<br />   return true;<br />  }<br />  <br />//基础js</p> <p>// =========================================================<br />// 目Q嘉兴市民健康信息系l?br />// 描述QAJAX控制模块脚本<br />// 路径Q?Archive: $<br />// 版本Q?Version: $ $Date: $<br />// =========================================================</p> <p>// ---------------------------------------------------------<br />// hqA状?br />// ---------------------------------------------------------</p> <p>// h未初始?br />RS_UNINITIALIZED = 0;<br />// h已经建立Q但仍未发?br />RS_NOT_SENT = 1;<br />// h已经发送,服务器尚未反?br />RS_SENT = 2;<br />// 服务器已l对hq行响应Q已q回了部分数?br />RS_IN_PROCESS = 3;<br />// h处理l束<br />RS_COMPLETE = 4;</p> <p>// ---------------------------------------------------------<br />// HTTP状态码分类<br />// ---------------------------------------------------------</p> <p>// 信息(1xx)<br />SC_PREFIX_INFO = 1;<br />// 客户端请求成?2xx)<br />SC_PREFIX_SUCCESS = 2;<br />// h转发Q需要后l指C?3xx)<br />SC_PREFIX_REDIRECT = 3;<br />// 客户端请求错?4xx)<br />SC_PREFIX_INCOMPLETE = 4;<br />// 服务器错?5xx)<br />SC_PREFIX_ERROR = 5;</p> <p>// ---------------------------------------------------------<br />// HTTP状态码帔R<br />// ---------------------------------------------------------</p> <p>// 信息(1xx)<br />SC_CONTINUE = 100;<br />SC_SWITCHING_PROTOCOLS = 101;</p> <p>// 客户端请求成?2xx)<br />SC_OK = 200;<br />SC_CREATED = 201;<br />SC_ACCEPTED = 202;<br />SC_NON_AUTHORITATIVE_INFORMATION = 203;<br />SC_NO_CONTENT = 204;<br />SC_RESET_CONTENT = 205;<br />SC_PARTIAL_CONTENT = 206;</p> <p>// h转发Q需要后l指C?3xx)<br />SC_MULTIPLE_CHOICES = 300;<br />SC_MOVED_PERMANENTLY = 301;<br />SC_MOVED_TEMPORARILY = 302;<br />SC_FOUND = 302;<br />SC_SEE_OTHER = 303;<br />SC_NOT_MODIFIED = 304;<br />SC_USE_PROXY = 305;<br />SC_TEMPORARY_REDIRECT = 307;</p> <p>// 客户端请求错?4xx)<br />SC_BAD_REQUEST = 400;<br />SC_UNAUTHORIZED = 401;<br />SC_PAYMENT_REQUIRED = 402;<br />SC_FORBIDDEN = 403;<br />SC_NOT_FOUND = 404;<br />SC_METHOD_NOT_ALLOWED = 405;<br />SC_NOT_ACCEPTABLE = 406;<br />SC_PROXY_AUTHENTICATION_REQUIRED = 407;<br />SC_REQUEST_TIMEOUT = 408;<br />SC_CONFLICT = 409;<br />SC_GONE = 410;<br />SC_LENGTH_REQUIRED = 411;<br />SC_PRECONDITION_FAILED = 412;<br />SC_REQUEST_ENTITY_TOO_LARGE = 413;<br />SC_REQUEST_URI_TOO_LONG = 414;<br />SC_UNSUPPORTED_MEDIA_TYPE = 415;<br />SC_REQUESTED_RANGE_NOT_SATISFIABLE = 416;<br />SC_EXPECTATION_FAILED = 417;</p> <p>// 服务器错?5xx)<br />SC_INTERNAL_SERVER_ERROR = 500;<br />SC_NOT_IMPLEMENTED = 501;<br />SC_BAD_GATEWAY = 502;<br />SC_SERVICE_UNAVAILABLE = 503;<br />SC_GATEWAY_TIMEOUT = 504;<br />SC_HTTP_VERSION_NOT_SUPPORTED = 505;</p> <p>// ---------------------------------------------------------<br />// Ҏ客户端浏览器cdQ徏立一个新的XML HTTPh对象Qƈ讄回调Ҏ?br />//<br />// 参数: <br />//   param  在回调方法中要用到的参数对象<br />// q回: <br />//  XML HTTPh对象Q或者nullQ如果浏览器不支持的话)<br />// ---------------------------------------------------------<br />function createXMLHttpRequest(param) {<br /> var httpRequest = null;</p> <p> if (window.XMLHttpRequest) { // Mozilla, Safari, ...<br />  httpRequest = createInMozilla();<br /> } else if (window.ActiveXObject) { // IE<br />  httpRequest = createInIE();<br /> }</p> <p> if (httpRequest == null) {<br />  try {<br />   // 览器不支持AJAX<br />   ajaxUnsupported();<br />   return;<br />  } catch (e) {<br />   throw new Error("Initialization fails!");<br />  }<br /> }</p> <p> // 讄回调Ҏ<br /> httpRequest.onreadystatechange = function() {<br />  readyStateChanged(httpRequest, param);<br /> };<br /> <br /> return httpRequest;<br />}</p> <p>// ---------------------------------------------------------<br />// 在Mozilla中徏立ƈq回一个新的XML HTTPh对象?br />//<br />// 参数: ?br />// q回: <br />//  XML HTTPh对象<br />// ---------------------------------------------------------<br />function createInMozilla() {<br /> var mozInstance = null;<br /> mozInstance = new XMLHttpRequest();<br /> if (mozInstance.overrideMimeType) {<br />  mozInstance.overrideMimeType("text/xml");<br /> }<br /> return mozInstance;<br />}</p> <p>// ---------------------------------------------------------<br />// 在IE中徏立ƈq回一个新的XML HTTPh对象?br />//<br />// 参数: ?br />// q回: <br />//  XML HTTPh对象<br />// ---------------------------------------------------------<br />function createInIE() {<br /> var name = ["Msxml3.XMLHTTP", "Msxml2.XMLHTTP", "Microsoft.XMLHTTP"];<br /> for (var i = 0; i < name.length; i++) {<br />  try {<br />   return new ActiveXObject(name[i]);<br />  } catch (e) {<br />  }<br /> }<br />}</p> <p>// ---------------------------------------------------------<br />// XML HTTPh对象的事件处理流E控制方法?br />// 该方法会在请求对象的qA状态发生变更的时候被自动调用?br />// 程控制中所调用的方法如非必,可以不定义,qƈ不会影响其他Ҏ的调用?br />//<br />// 参数: <br />//   httpRequest  XML HTTPh对象<br />//   param   在回调方法中要用到的参数对象<br />// q回: ?br />// ---------------------------------------------------------<br />function readyStateChanged(httpRequest, param) {<br /> try {<br />  // 具体事g处理Ҏ调用之前的共通前期处?br />  preProcessReadyStateChanged(httpRequest, param);<br /> } catch (e) {<br /> }</p> <p> try {<br />  // Ҏ不同的状态,分别调用不同的处理方?br />  switch (httpRequest.readyState) {<br />   case RS_UNINITIALIZED:<br />    // h未初始?br />    readyStateUninitialized(httpRequest, param);<br />    break;<br />   case RS_NOT_SENT:<br />    // h已经建立Q但仍未发?br />    readyStateNotSent(httpRequest, param);<br />    break;<br />   case RS_SENT:<br />    // h已经发送,服务器尚未反?br />    readyStateSent(httpRequest, param);<br />    break;<br />   case RS_IN_PROCESS:<br />    // 服务器已l对hq行响应Q已q回了部分数?br />    readyStateInProcess(httpRequest, param);<br />    break;<br />   case RS_COMPLETE:<br />    // h处理l束<br />    readyStateComplete(httpRequest, param);<br />    break;<br />  }<br /> } catch (e) {<br /> }</p> <p> try {<br />  // 具体事g处理Ҏ调用之后的共通后期处?br />  postProcessReadyStateChanged(httpRequest, param);<br /> } catch (e) {<br /> }<br />}<br />//ajax<br /><br />/*--------------------------------------------------|</p> <p>| dTree 2.05 | <a >www.destroydrop.com/javascript/tree/</a> |</p> <p>|---------------------------------------------------|</p> <p>| Copyright (c) 2002-2003 Geir Landr?              |</p> <p>|                                                   |</p> <p>| This script can be used freely as long as all     |</p> <p>| copyright messages are intact.                    |</p> <p>|                                                   |</p> <p>| Updated: 17.04.2003                               |</p> <p>|--------------------------------------------------*/</p> <p> </p> <p>// Node object</p> <p>function Node(id, pid, name, url, title, target, icon, iconOpen, open) {</p> <p> this.id = id;</p> <p> this.pid = pid;</p> <p> this.name = name;</p> <p> this.url = url;</p> <p> this.title = title;</p> <p> this.target = target;</p> <p> this.icon = icon;</p> <p> this.iconOpen = iconOpen;</p> <p> this._io = open || false;</p> <p> this._is = false;</p> <p> this._ls = false;</p> <p> this._hc = false;</p> <p> this._ai = 0;</p> <p> this._p;</p> <p>};</p> <p> </p> <p>// Tree object</p> <p>function dTree(objName) {</p> <p> this.config = {</p> <p>  target     : null,</p> <p>  folderLinks   : false,</p> <p>  useSelection  : false,</p> <p>  useCookies   : false,</p> <p>  useLines    : false,</p> <p>  useIcons    : false,</p> <p>  useStatusText  : true,</p> <p>  closeSameLevel : true,</p> <p>  inOrder     : false</p> <p> }</p> <p> this.icon = {</p> <p>  root    : 'js/img/base.gif',</p> <p>  folder   : 'js/img/folder.gif',</p> <p>  folderOpen : 'js/img/folderopen.gif',</p> <p>  node    : 'js/img/page.gif',</p> <p>  empty    : 'js/img/empty.gif',</p> <p>  line    : 'js/img/line.gif',</p> <p>  join    : 'js/img/join.gif',</p> <p>  joinBottom : 'js/img/joinbottom.gif',</p> <p>  plus    : 'js/img/plus.gif',</p> <p>  plusBottom : 'js/img/plusbottom.gif',</p> <p>  minus    : 'js/img/minus.gif',</p> <p>  minusBottom : 'js/img/minusbottom.gif',</p> <p>  nlPlus   : 'js/img/nolines_plus.gif',</p> <p>  nlMinus   : 'js/img/nolines_minus.gif'</p> <p> };</p> <p> this.obj = objName;</p> <p> this.aNodes = [];</p> <p> this.aIndent = [];</p> <p> this.root = new Node(-1);</p> <p> this.selectedNode = null;</p> <p> this.selectedFound = false;</p> <p> this.completed = false;</p> <p>};</p> <p> </p> <p>// Adds a new node to the node array</p> <p>dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) {</p> <p> this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open);</p> <p>};</p> <p> </p> <p>// Open/close all nodes</p> <p>dTree.prototype.openAll = function() {</p> <p> this.oAll(true);</p> <p>};</p> <p>dTree.prototype.closeAll = function() {</p> <p> this.oAll(false);</p> <p>};</p> <p> </p> <p>// Outputs the tree to the page</p> <p>dTree.prototype.toString = function() {</p> <p> var str = '<div class="dtree">\n';</p> <p> if (document.getElementById) {</p> <p>  if (this.config.useCookies) this.selectedNode = this.getSelected();</p> <p>  str += this.addNode(this.root);</p> <p> } else str += 'Browser not supported.';</p> <p> str += '</div>';</p> <p> if (!this.selectedFound) this.selectedNode = null;</p> <p> this.completed = true;</p> <p> return str;</p> <p>};</p> <p> </p> <p>// Creates the tree structure</p> <p>dTree.prototype.addNode = function(pNode) {</p> <p> var str = '';</p> <p> var n=0;</p> <p> if (this.config.inOrder) n = pNode._ai;</p> <p> for (n; n<this.aNodes.length; n++) {</p> <p>  if (this.aNodes[n].pid == pNode.id) {</p> <p>   var cn = this.aNodes[n];</p> <p>   cn._p = pNode;</p> <p>   cn._ai = n;</p> <p>   this.setCS(cn);</p> <p>   if (!cn.target && this.config.target) cn.target = this.config.target;</p> <p>   if (cn._hc && !cn._io && this.config.useCookies) cn._io = this.isOpen(cn.id);</p> <p>   if (!this.config.folderLinks && cn._hc) cn.url = null;</p> <p>   if (this.config.useSelection && cn.id == this.selectedNode && !this.selectedFound) {</p> <p>     cn._is = true;</p> <p>     this.selectedNode = n;</p> <p>     this.selectedFound = true;</p> <p>   }</p> <p>   str += this.node(cn, n);</p> <p>   if (cn._ls) break;</p> <p>  }</p> <p> }</p> <p> return str;</p> <p>};</p> <p> </p> <p>// Creates the node icon, url and text</p> <p>dTree.prototype.node = function(node, nodeId) {</p> <p> var str = '<div class="dTreeNode">' + this.indent(node, nodeId);</p> <p> if (this.config.useIcons) {</p> <p>  if (!node.icon) node.icon = (this.root.id == node.pid) ? this.icon.root : ((node._hc) ? this.icon.folder : this.icon.node);</p> <p>  if (!node.iconOpen) node.iconOpen = (node._hc) ? this.icon.folderOpen : this.icon.node;</p> <p>  if (this.root.id == node.pid) {</p> <p>   node.icon = this.icon.root;</p> <p>   node.iconOpen = this.icon.root;</p> <p>  }</p> <p>  str += '<img id="i' + this.obj + nodeId + '" src="' + ((node._io) ? node.iconOpen : node.icon) + '" alt="" />';</p> <p> }</p> <p> if (node.url) {</p> <p>  str += '<a id="s' + this.obj + nodeId + '" class="' + ((this.config.useSelection) ? ((node._is ? 'nodeSel' : 'node')) : 'node') + '" href= "javascript:submitForm(\'menu'+node.id+'\''+',\''+node.url+'\')"';</p> <p>  if (node.title) str += ' title="' + node.title + '"';</p> <p>  if (node.target) str += ' target="' + node.target + '"';</p> <p>  if (this.config.useStatusText) str += ' onmouseover="window.status=\'\';return true;" onmouseout="window.status=\'\';return true;" ';</p> <p>  if (this.config.useSelection && ((node._hc && this.config.folderLinks) || !node._hc))</p> <p>   str += ' onclick="javascript: ' + this.obj + '.s(' + nodeId + ');"';</p> <p>  str += '>';<br />  <br /> }</p> <p> else if ((!this.config.folderLinks || !node.url) && node._hc && node.pid != this.root.id)</p> <p>  str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');" class="node">';</p> <p> str += node.name;</p> <p> if (node.url || ((!this.config.folderLinks || !node.url) && node._hc)) str += '</a>';</p> <p> str += '</div>';<br /> <br /> if (node._hc) {</p> <p>  str += '<div id="d' + this.obj + nodeId + '" class="clip" style="display:' + ((this.root.id == node.pid || node._io) ? 'block' : 'none') + ';">';</p> <p>  str += this.addNode(node);</p> <p>  str += '</div>';</p> <p> }<br /> this.aIndent.pop();</p> <p> return str;</p> <p>};</p> <p> </p> <p>// Adds the empty and line icons</p> <p>dTree.prototype.indent = function(node, nodeId) {</p> <p> var str = '';</p> <p> if (this.root.id != node.pid) {</p> <p>  for (var n=0; n<this.aIndent.length; n++)</p> <p>   str += '<img src="' + ( (this.aIndent[n] == 1 && this.config.useLines) ? this.icon.line : this.icon.empty ) + '" alt="" />';</p> <p>  (node._ls) ? this.aIndent.push(0) : this.aIndent.push(1);</p> <p>  if (node._hc) {</p> <p>   str += '<a href="javascript: ' + this.obj + '.o(' + nodeId + ');"><img id="j' + this.obj + nodeId + '" src="';</p> <p>   if (!this.config.useLines) str += (node._io) ? this.icon.nlMinus : this.icon.nlPlus;</p> <p>   else str += ( (node._io) ? ((node._ls && this.config.useLines) ? this.icon.minusBottom : this.icon.minus) : ((node._ls && this.config.useLines) ? this.icon.plusBottom : this.icon.plus ) );</p> <p>   str += '" alt="" /></a>';</p> <p>  } else str += '<img src="' + ( (this.config.useLines) ? ((node._ls) ? this.icon.joinBottom : this.icon.join ) : this.icon.empty) + '" alt="" />';</p> <p> }</p> <p> return str;</p> <p>};</p> <p> </p> <p>// Checks if a node has any children and if it is the last sibling</p> <p>dTree.prototype.setCS = function(node) {</p> <p> var lastId;</p> <p> for (var n=0; n<this.aNodes.length; n++) {</p> <p>  if (this.aNodes[n].pid == node.id) node._hc = true;</p> <p>  if (this.aNodes[n].pid == node.pid) lastId = this.aNodes[n].id;</p> <p> }</p> <p> if (lastId==node.id) node._ls = true;</p> <p>};</p> <p> </p> <p>// Returns the selected node</p> <p>dTree.prototype.getSelected = function() {</p> <p> var sn = this.getCookie('cs' + this.obj);</p> <p> return (sn) ? sn : null;</p> <p>};</p> <p> </p> <p>// Highlights the selected node</p> <p>dTree.prototype.s = function(id) {</p> <p> if (!this.config.useSelection) return;</p> <p> var cn = this.aNodes[id];</p> <p> if (cn._hc && !this.config.folderLinks) return;</p> <p> if (this.selectedNode != id) {</p> <p>  if (this.selectedNode || this.selectedNode==0) {</p> <p>   eOld = document.getElementById("s" + this.obj + this.selectedNode);</p> <p>   eOld.className = "node";</p> <p>  }</p> <p>  eNew = document.getElementById("s" + this.obj + id);</p> <p>  eNew.className = "nodeSel";</p> <p>  this.selectedNode = id;</p> <p>  if (this.config.useCookies) this.setCookie('cs' + this.obj, cn.id);</p> <p> }</p> <p>};</p> <p> </p> <p>// Toggle Open or close</p> <p>dTree.prototype.o = function(id) {</p> <p> var cn = this.aNodes[id];</p> <p> this.nodeStatus(!cn._io, id, cn._ls);</p> <p> cn._io = !cn._io;</p> <p> if (this.config.closeSameLevel) this.closeLevel(cn);</p> <p> if (this.config.useCookies) this.updateCookie();</p> <p>};</p> <p> </p> <p>// Open or close all nodes</p> <p>dTree.prototype.oAll = function(status) {</p> <p> for (var n=0; n<this.aNodes.length; n++) {</p> <p>  if (this.aNodes[n]._hc && this.aNodes[n].pid != this.root.id) {</p> <p>   this.nodeStatus(status, n, this.aNodes[n]._ls)</p> <p>   this.aNodes[n]._io = status;</p> <p>  }</p> <p> }</p> <p> if (this.config.useCookies) this.updateCookie();</p> <p>};</p> <p> </p> <p>// Opens the tree to a specific node</p> <p>dTree.prototype.openTo = function(nId, bSelect, bFirst) {</p> <p> if (!bFirst) {</p> <p>  for (var n=0; n<this.aNodes.length; n++) {</p> <p>   if (this.aNodes[n].id == nId) {</p> <p>    nId=n;</p> <p>    break;</p> <p>   }</p> <p>  }</p> <p> }</p> <p> var cn=this.aNodes[nId];</p> <p> if (cn.pid==this.root.id || !cn._p) return;</p> <p> cn._io = true;</p> <p> cn._is = bSelect;</p> <p> if (this.completed && cn._hc) this.nodeStatus(true, cn._ai, cn._ls);</p> <p> if (this.completed && bSelect) this.s(cn._ai);</p> <p> else if (bSelect) this._sn=cn._ai;</p> <p> this.openTo(cn._p._ai, false, true);</p> <p>};</p> <p> </p> <p>// Closes all nodes on the same level as certain node</p> <p>dTree.prototype.closeLevel = function(node) {</p> <p> for (var n=0; n<this.aNodes.length; n++) {</p> <p>  if (this.aNodes[n].pid == node.pid && this.aNodes[n].id != node.id && this.aNodes[n]._hc) {</p> <p>   this.nodeStatus(false, n, this.aNodes[n]._ls);</p> <p>   this.aNodes[n]._io = false;</p> <p>   this.closeAllChildren(this.aNodes[n]);</p> <p>  }</p> <p> }</p> <p>}</p> <p> </p> <p>// Closes all children of a node</p> <p>dTree.prototype.closeAllChildren = function(node) {</p> <p> for (var n=0; n<this.aNodes.length; n++) {</p> <p>  if (this.aNodes[n].pid == node.id && this.aNodes[n]._hc) {</p> <p>   if (this.aNodes[n]._io) this.nodeStatus(false, n, this.aNodes[n]._ls);</p> <p>   this.aNodes[n]._io = false;</p> <p>   this.closeAllChildren(this.aNodes[n]);  </p> <p>  }</p> <p> }</p> <p>}</p> <p> </p> <p>// Change the status of a node(open or closed)</p> <p>dTree.prototype.nodeStatus = function(status, id, bottom) {</p> <p> eDiv = document.getElementById('d' + this.obj + id);</p> <p> eJoin = document.getElementById('j' + this.obj + id);</p> <p> if (this.config.useIcons) {</p> <p>  eIcon = document.getElementById('i' + this.obj + id);</p> <p>  eIcon.src = (status) ? this.aNodes[id].iconOpen : this.aNodes[id].icon;</p> <p> }</p> <p> eJoin.src = (this.config.useLines)?</p> <p> ((status)?((bottom)?this.icon.minusBottom:this.icon.minus):((bottom)?this.icon.plusBottom:this.icon.plus)):</p> <p> ((status)?this.icon.nlMinus:this.icon.nlPlus);</p> <p> eDiv.style.display = (status) ? 'block': 'none';</p> <p>};</p> <p> </p> <p> </p> <p>// [Cookie] Clears a cookie</p> <p>dTree.prototype.clearCookie = function() {</p> <p> var now = new Date();</p> <p> var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);</p> <p> this.setCookie('co'+this.obj, 'cookieValue', yesterday);</p> <p> this.setCookie('cs'+this.obj, 'cookieValue', yesterday);</p> <p>};</p> <p> </p> <p>// [Cookie] Sets value in a cookie</p> <p>dTree.prototype.setCookie = function(cookieName, cookieValue, expires, path, domain, secure) {</p> <p> document.cookie =</p> <p>  escape(cookieName) + '=' + escape(cookieValue)</p> <p>  + (expires ? '; expires=' + expires.toGMTString() : '')</p> <p>  + (path ? '; path=' + path : '')</p> <p>  + (domain ? '; domain=' + domain : '')</p> <p>  + (secure ? '; secure' : '');</p> <p>};</p> <p> </p> <p>// [Cookie] Gets a value from a cookie</p> <p>dTree.prototype.getCookie = function(cookieName) {</p> <p> var cookieValue = '';</p> <p> var posName = document.cookie.indexOf(escape(cookieName) + '=');</p> <p> if (posName != -1) {</p> <p>  var posValue = posName + (escape(cookieName) + '=').length;</p> <p>  var endPos = document.cookie.indexOf(';', posValue);</p> <p>  if (endPos != -1) cookieValue = unescape(document.cookie.substring(posValue, endPos));</p> <p>  else cookieValue = unescape(document.cookie.substring(posValue));</p> <p> }</p> <p> return (cookieValue);</p> <p>};</p> <p> </p> <p>// [Cookie] Returns ids of open nodes as a string</p> <p>dTree.prototype.updateCookie = function() {</p> <p> var str = '';</p> <p> for (var n=0; n<this.aNodes.length; n++) {</p> <p>  if (this.aNodes[n]._io && this.aNodes[n].pid != this.root.id) {</p> <p>   if (str) str += '.';</p> <p>   str += this.aNodes[n].id;</p> <p>  }</p> <p> }</p> <p> this.setCookie('co' + this.obj, str);</p> <p>};</p> <p> </p> <p>// [Cookie] Checks if a node id is in a cookie</p> <p>dTree.prototype.isOpen = function(id) {</p> <p> var aOpen = this.getCookie('co' + this.obj).split('.');</p> <p> for (var n=0; n<aOpen.length; n++)</p> <p>  if (aOpen[n] == id) return true;</p> <p> return false;</p> <p>};</p> <p> </p> <p>// If Push and pop is not implemented by the browser</p> <p>if (!Array.prototype.push) {</p> <p> Array.prototype.push = function array_push() {</p> <p>  for(var i=0;i<arguments.length;i++)</p> <p>   this[this.length]=arguments[i];</p> <p>  return this.length;</p> <p> }</p> <p>};</p> <p>if (!Array.prototype.pop) {</p> <p> Array.prototype.pop = function array_pop() {</p> <p>  lastElement = this[this.length-1];</p> <p>  this.length = Math.max(this.length-1,0);</p> <p>  return lastElement;</p> <p> }</p> <p>};</p> <img src ="http://www.tkk7.com/songfei/aggbug/99406.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/songfei/" target="_blank">天外飞仙</a> 2007-02-12 12:15 <a href="http://www.tkk7.com/songfei/articles/99406.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>如何在页面中辑ֈ回R和按TAB一L效果Q?/title><link>http://www.tkk7.com/songfei/articles/92340.html</link><dc:creator>天外飞仙</dc:creator><author>天外飞仙</author><pubDate>Mon, 08 Jan 2007 04:50:00 GMT</pubDate><guid>http://www.tkk7.com/songfei/articles/92340.html</guid><wfw:comment>http://www.tkk7.com/songfei/comments/92340.html</wfw:comment><comments>http://www.tkk7.com/songfei/articles/92340.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/songfei/comments/commentRss/92340.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/songfei/services/trackbacks/92340.html</trackback:ping><description><![CDATA[<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<a ><br /><html xmlns="<a ><br /><head><br /><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><br /><title>按键试2</title><br /><script language="javascript"><br />    <!--<br />  //键盘回R事g转化为tab事g<br />   //text中的Readonly不进入焦?br />   //radio中的checked=false不进入焦?br />   function movetoNext(){<br />     if(event.keyCode==13){//当按回R的时?br />      try{<br />       if(document.activeElement.type=="textarea"){//当运到是textarea时不跛_下一个组?br />        if(document.activeElement.readOnly==true){//只读的话p下去<br />         event.keyCode=9;<br />        }<br />        return true;<br />       }else{<br />        if (event.srcElement.type == "button"){<br />         event.keyCode=9;<br />           if(event.srcElement.value == "查询" || event.srcElement.value == "保存" || event.srcElement.value == "下一? || event.srcElement.value == "d" ){//|| event.srcElement.value == "编?<br />               <br />               event.srcElement.onclick();<br />           }<br />        }else{<br />         <br />         var nextIndex=getItemIndex();<br />         if (document.all.item(nextIndex).type == "text" || document.all.item(nextIndex).type == "textarea"){<br />          if(document.all.item(nextIndex).readOnly==true){<br />          <br />           getNextIndex(nextIndex);<br />          }else{<br />           event.keyCode=9;<br />          }<br />          //getNextItem();<br />         }else{//下一个不是text<br />          if(document.all.item(nextIndex).disabled==true){<br />           getNextIndex(nextIndex); <br />          }else{<br />           if(document.all.item(nextIndex).type=="radio"){<br />            //document.all.item(nextIndex).focus();<br />            ///*每一个radio都进入焦?br />            if(document.all.item(nextIndex).checked==true){<br />             event.keyCode=9;<br />            }else{<br />             getNextIndex(nextIndex);<br />            }<br />            //*/<br />           }else{<br />            event.keyCode=9;<br />           }<br />           <br />          }<br />         <br />         }<br />        }<br />       }<br />      }catch(e){<br />       alert("未知异常");<br />       event.keyCode=9<br />      }<br />      return true;<br />     }else{<br />         return false;<br />     }<br />   }<br />   <br />  <br />  function getItemIndex(){<br />   var index;//当前的sourceIndex<br />    var nextIndex;//下一个sourceIndex<br />    index=window.event.srcElement.sourceIndex;<br />    index+=1;<br /> with   (document.all){   <br />          var   aTab   =   new   Array(length); <br />          for   ( var i=index;i<length;i++)   { <br />    <br />            if(item(i).type=="text" || item(i).type=="textarea" || item(i).type=="checkbox" || item(i).type=="radio" || (item(i).type=="select" && item(i).disabled==false ) || ( item(i).type=="select-one"  && item(i).disabled==false ) ){<br />            <br />               nextIndex   =   item(i).sourceIndex;   <br />               break;<br />             }<br />          }   <br />      }   <br />   return nextIndex;<br />  }<br />  function getNextIndex(argindex){<br />   <br />    var index;//当前的sourceIndex<br />    var nextIndex;//下一个sourceIndex<br />    index=document.all.item(argindex).sourceIndex;<br />    index+=1;<br /> with   (document.all){   <br />          var   aTab   =   new   Array(length);   <br />          for   (var i=index;i<length;i++)   { <br />            if(item(i).type=="text" || item(i).type=="textarea" || item(i).type=="checkbox" || item(i).type=="radio" || (item(i).type=="select" && item(i).disabled==false ) || ( item(i).type=="select-one"  && item(i).disabled==false ) ){<br />            <br />               nextIndex   =   item(i).sourceIndex;   <br />               break;<br />             }<br />          }   <br />      }   <br />      <br />   if (document.all.item(nextIndex).type == "text" || document.all.item(nextIndex).type == "textarea"){<br />   <br />     if(document.all.item(nextIndex).readOnly==true){<br />      getNextIndex(nextIndex); <br />  }else{<br />     document.all.item(nextIndex).focus();<br />  }<br />   }else{<br />     if(document.all.item(nextIndex).type==undefined){<br />      event.keyCode=9;<br />     }<br />     if(document.all.item(nextIndex).disabled==true){<br />      getNextIndex(nextIndex); <br />     }else{ <br />      if(document.all.item(nextIndex).type=="radio"){<br />       if(document.all.item(nextIndex).checked==true){<br />        document.all.item(nextIndex).focus();<br />       }else{<br />        getNextIndex(nextIndex);<br />       }<br />      }else{<br />       document.all.item(nextIndex).focus();<br />      }<br />     }<br />   }<br />   return true;<br />  }<br />  <br />    //--><br />  </script><br /></head><br /><body onkeydown="movetoNext();" ><br /><form id="form1" name="form1" method="post" action="" ><br />  <div align="center"> <br /><br />    <br /><br />    <br /><br />    <table width="770" id="table1" height="218" border="1" cellpadding="0" cellspacing="0"><br />      <tr><br />        <td width="126" height="18"><input name="textfield" type="text" value="hsish" size="18" maxlength="18" />        </td><br />        <td width="126"><input name="textfield2" type="text" size="18" maxlength="18" /></td><br />        <td width="126"><input name="textfield3" type="text" size="18" maxlength="18" /></td><br />        <td width="126"><input name="textfield4" type="text" size="18" maxlength="18" /></td><br />        <td width="126"><input name="textfield5" type="text" size="18" maxlength="18" /></td><br />        <td width="126"><input name="textfield6" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield7" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield18" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield39" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield40" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield71" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield70" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield8" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield19" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield38" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield41" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield72" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield69" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield9" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield20" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield37" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield42" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield67" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield68" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield10" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield21" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield36" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield43" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield66" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield65" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield11" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield22" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield35" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield44" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield63" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield64" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield12" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield23" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield34" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield45" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield62" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield61" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield13" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield24" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield33" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield46" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield59" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield60" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield14" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield25" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield32" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield47" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield58" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield57" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield15" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield26" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield31" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield48" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield55" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield56" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield16" type="text" size="18" maxlength="18" /></td><br />        <td><label><br />          <textarea name="textarea"></textarea><br />        </label></td><br />        <td><input name="textfield30" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield49" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield54" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield53" type="text" size="18" maxlength="18" /></td><br />      </tr><br />      <tr><br />        <td height="18"><input name="textfield17" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield28" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield29" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield50" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield51" type="text" size="18" maxlength="18" /></td><br />        <td><input name="textfield52" type="text" size="18" maxlength="18" /></td><br />      </tr><br />    </table><br />  </div><br /></form><br /></body><br /></html><br /><img src ="http://www.tkk7.com/songfei/aggbug/92340.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/songfei/" target="_blank">天外飞仙</a> 2007-01-08 12:50 <a href="http://www.tkk7.com/songfei/articles/92340.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JS代码集?http://www.tkk7.com/songfei/articles/92338.html天外飞仙天外飞仙Mon, 08 Jan 2007 04:46:00 GMThttp://www.tkk7.com/songfei/articles/92338.htmlhttp://www.tkk7.com/songfei/comments/92338.htmlhttp://www.tkk7.com/songfei/articles/92338.html#Feedback0http://www.tkk7.com/songfei/comments/commentRss/92338.htmlhttp://www.tkk7.com/songfei/services/trackbacks/92338.html阅读全文

天外飞仙 2007-01-08 12:46 发表评论
]]>
HTML控g的所有方法和属?/title><link>http://www.tkk7.com/songfei/articles/72312.html</link><dc:creator>天外飞仙</dc:creator><author>天外飞仙</author><pubDate>Wed, 27 Sep 2006 07:15:00 GMT</pubDate><guid>http://www.tkk7.com/songfei/articles/72312.html</guid><wfw:comment>http://www.tkk7.com/songfei/comments/72312.html</wfw:comment><comments>http://www.tkk7.com/songfei/articles/72312.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/songfei/comments/commentRss/72312.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/songfei/services/trackbacks/72312.html</trackback:ping><description><![CDATA[     摘要: Google 桌面补充工具栏小工具入门 Google 桌面主页 ...  <a href='http://www.tkk7.com/songfei/articles/72312.html'>阅读全文</a><img src ="http://www.tkk7.com/songfei/aggbug/72312.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/songfei/" target="_blank">天外飞仙</a> 2006-09-27 15:15 <a href="http://www.tkk7.com/songfei/articles/72312.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>常用js函数 http://www.tkk7.com/songfei/articles/71579.html天外飞仙天外飞仙Sun, 24 Sep 2006 08:37:00 GMThttp://www.tkk7.com/songfei/articles/71579.htmlhttp://www.tkk7.com/songfei/comments/71579.htmlhttp://www.tkk7.com/songfei/articles/71579.html#Feedback0http://www.tkk7.com/songfei/comments/commentRss/71579.htmlhttp://www.tkk7.com/songfei/services/trackbacks/71579.html 常用js函数

/**//*------------------------------------------------------------
 dateDlg(inputid,initDate,startYear,endYear)  弹出旉H口
 compareDate(end,s)                           与当前时间比?br /> compareTwoDate(startDate,endDate,s)          比较两个旉
 isNumber(text,name)                          判断全是数字(true)                         
 isChar(text,addtemp,name,include)            判断W合要求字符
 isEmail(text)                                判断是电子邮?br /> isPid(text)                                  判断是n份证?br /> isNull(text,name)                            判断为空则提C?true)
 getLength(text)                              获取长度
 lengthEquals(text,name,num)                  定长度(true)
 lengthless(text,name,num)             长度不少?true)
 lengthmore(text,name,num)             长度不大?true)
        checkPassword(text,text1)                    验两ơ输入密码是否一?true)
  ------------------------------------------------------------
//checkData()攑֜jsp面
<script language="JavaScript" src="check.js"></script>
<script language="JavaScript">
function checkData()
{
 if(isNull(form1.name,'帐号')){}
 else if(lengthEquals(form1.name,"帐号",8)){}
 else if (getLength(form1.name)>13){}
 else{
  form1.submit();
 } 
}
</script>
  ------------------------------------------------------------*/
/**//*------------------------------------------------------------
 弹出旉选择控?br /> inputidQ-文本框name
 initDateQ-初始日期QؓI时是当前时?br /> startYearQ-日期范围的开始日?br /> endYearQ-日期范围的结束日?br /> 使用例子onClick="dateDlg(end,'1999-11-12','1980','2010')"
  ------------------------------------------------------------*/
function dateDlg(inputid,initDate,startYear,endYear)
{
 var pattern = /^(19|20)([0-9]){2}$/;
 flag=pattern.test(startYear);
 if(!flag)startYear=1900;
 flag=pattern.test(endYear);
 if(!flag)endYear=2050;
 if(inputid.value==null||inputid.value=='')
  {
   if(initDate==null||initDate=='')
   {
     currentDate = new Date(); 
   }
   else{
    currentDate = initDate;
   }
  }
 else{
   currentDate = inputid.value;
  }
 var arguments = new Array(startYear,endYear,0,0,0)

 var pattern = /^(19|20)([0-9]){2}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/;
 flag=pattern.test(currentDate);
 if(flag)
 {
  iYear=currentDate.substring(0,4);
  iMonth=currentDate.substring(5,7);
  iDay=currentDate.substring(8,10);
  arguments = new Array(startYear,endYear,iYear,iMonth,iDay)
 }
 showx = event.screenX - event.offsetX + 18;
 showy = event.screenY - event.offsetY - 210;

 var features =
  'dialogWidth:'  + 192 + 'px;' +
  'dialogHeight:' + 210 + 'px;' +
  'dialogLeft:'   + showx     + 'px;' +
  'dialogTop:'    + showy     + 'px;' +
  'directories:no; localtion:no; menubar:no; status=no; toolbar=no;scrollbars:yes;Resizeable=no';
 retval = window.showModalDialog("../js/calendar.htm", arguments , features );
 var calctrl = eval(inputid)
 if( retval != null ){
  calctrl.value = retval;
 }else{
  //alert("canceled");
 }
}

/**//*------------------------------------------------------------
 Trim()d右空?br />  ------------------------------------------------------------*/

String.prototype.Trim = function()
{
    return this.replace(/(^\s*)|(\s*$)/g, "");
}
String.prototype.LTrim = function()
{
    return this.replace(/(^\s*)/g, "");
}
String.prototype.Rtrim = function()
{
    return this.replace(/(\s*$)/g, "");
}
/**//*------------------------------------------------------------
 判断密码是否有单引号
  ------------------------------------------------------------*/
function isNotYinhao(s)
{  
    var yin;
 var temp="'";
 for(yin=0; yin < s.length; yin++ )
 {
  var ch = s.charAt(yin);
  if(temp.indexOf(ch)>=0)
  {
   return true;
  }
 }
 return false;
}

/**//*------------------------------------------------------------
 定义变量
  ------------------------------------------------------------*/
var i,j;

/**//*------------------------------------------------------------
 和当前日期比较,如果当前日期大于输入日期则提C?br /> end----输入日期
 s----提示信息
 使用例子onClick="compareDate(end,'选择日期不能在今天之?')"
  ------------------------------------------------------------*/
function compareDate(end,s){
var a=new Date();
var b=end.value;
if(((Number(a.getYear())-Number(b.substring(0,4)))*356+
       (Number(a.getMonth())-Number(b.substring(5,7))+1)*31+
    (Number(a.getDate())-Number(b.substring(8,10))))>0)
 {
  alert(s);
  end.focus();
 }
}


/**//*------------------------------------------------------------
 两个旉q行比较Q当开始日期大于结束日期则提示
 startDate----开始日?br /> endDate------l束日期
 使用例子onClick="compareTwoDate(startDate,endDate,'开始日期不能大于结束日?')"
  ------------------------------------------------------------*/
function compareTwoDate(startDate,endDate,s)
{
var a=startDate.value;
var b=endDate.value;
if(((Number(a.substring(0,4))-Number(b.substring(0,4)))*356+
       (Number(a.substring(5,7))-Number(b.substring(5,7)))*31+
    (Number(a.substring(8,10))-Number(b.substring(8,10))))>0)
 {
  alert(s);
  startDate.focus();
 }
}

/**//*------------------------------------------------------------
 判断是否为数字类型,如不是数字类型则提示
 text-------输入文本
 name-------提示的名?br /> 使用例子onBlur="compareTwoDate(this,'电话L')"
  ------------------------------------------------------------*/
function isNumber(text,name)
{
  var temp="0123456789";
   for(j=0; j<text.value.length; j++ )
   {   
     var ch = text.value.Trim().charAt(j);
  if(temp.indexOf(ch)==-1)
  {
   alert(name+"应ؓ数字cd!");
   text.focus();
   return true;
  } 
   }
}

/**//*------------------------------------------------------------
 判断两次密码输入是否一?br /> text-------新密?br /> name-------再次输入新密?br /> 使用例子checkPassword(form1.newpass,form1.newpass1)
  ------------------------------------------------------------*/
function checkPassword(text,text1)
{
  var newpass=text.value.Trim();
  var newpass1=text1.value.Trim();
  if(newpass!=newpass1){
    alert("两次输入新密码不一?");
    text.focus();
    return true;
  }
}


/**//*------------------------------------------------------------
 判断是否包含非法字符Q如含非法字W则提示
 text-------输入文本
 addtemp----除英文和数字外还可包含的字符
 name-------提示的名?br /> include----提示中不允许包含的字W?br /> 使用例子onBlur="compareTwoDate(this,'@_','邮g','%*$')"
  ------------------------------------------------------------*/
function isChar(text,addtemp,name,include)
{
  var temp="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"+addtemp;
   for(j=0; j<text.value.length; j++ )
   {   
     var ch = text.value.Trim().charAt(j);
  if(temp.indexOf(ch)==-1)
  {
   alert(name+"中不允许包含'"+include+"'{字W?");
   text.focus();
   break;
  } 
   }
}

/**//*------------------------------------------------------------
 判断输入的是否ؓ电子邮gQ如含非法字W则提示
 text-------输入的电子邮?br /> 使用例子onBlur="isEmail(this)"
  ------------------------------------------------------------*/
function isEmail(text)
{  
 var email=text.value.Trim();
 var m=email.indexOf("@");
 var n=email.indexOf(".");
 if(email!="")
 {
  if(m<1||m>email.length-3)
  {
   alert("误入正的电子邮g格式!");
   text.focus();
   return true;
  }
  else if(n<m+2||n>email.length-2)
  {
   alert("误入正的电子邮g格式!");
   text.focus();
   return true;
  }
 }
}
/**//*------------------------------------------------------------
 判断输入文本是否n份证LQ如Z正确则提C?br /> text-------输入的n份证L
 使用例子onBlur="isPid(this)"
  ------------------------------------------------------------*/
function isPid(text)
{
 var pid=text.value.Trim();
 var temp="0123456789";
 var temp1="0123456789xX";
 if(pid!=""){
 if(pid.length==15)
 {
     for(j=0; j<15; j++ )
     {   
   var ch = pid.charAt(j);
   if(temp.indexOf(ch)==-1)
   {
    alert("误入正的w䆾证号?");
    text.focus();
    break;
   }
  }      
 }
 else if(pid.length==18)
 {

     for(j=0; j<pid.length-1; j++ )
     {   
   var ch = pid.charAt(j);
   if(temp.indexOf(ch)==-1)
   {
    alert("误入正的w䆾证号?");
    text.focus();
    break;
   }
  }      
  var ch1 = pid.charAt(pid.length-1);
  if(temp1.indexOf(ch1)==-1)
   {
    alert("误入正的w䆾证号?");
    text.focus();
   }   
 }
 else{
  alert("w䆾证号码的应ؓ15位或18?");
  text.focus();
 }}
}

/**//*------------------------------------------------------------
 判断输入文本是否为空Q如为空则提C?br /> text-------输入文本
 使用例子onBlur="isNull(this,'姓名')"
  ------------------------------------------------------------*/
function isNull(text,name)
{
 if(text.value.Trim()==null||text.value.Trim()=="")
 {
  alert(name+"不能为空!");
  text.focus();
  return true;
 }
}

/**//*------------------------------------------------------------
 获取文本框长度,中文作ؓ两个字符处理
 text-------输入文本
 使用例子getLength(form1.name)
  ------------------------------------------------------------*/
function getLength(text)
{
 var temp="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
 temp=temp+" temp=temp+"·~!◎#K%……※×(Q——+Q=÷【】『』;‘:“,。、《?";
 var len = text.value.Trim().length;
 for(j=0;j<text.value.Trim().length;j++)
 {
  var ch= text.value.Trim().charAt(j);
  if(temp.indexOf(ch)==-1){
  len++;
  }
 }
 return len;
}

/*------------------------------------------------------------
 lengthEquals(text,name,num)    相等长度
 lengthless(text,name,num)      长度不少?br /> lengthmore(text,name,num)      长度不大?br /> 获取文本框长度,中文作ؓ两个字符处理
 text-------输入文本
 使用例子getLength(form1.name,'姓名',8)
  ------------------------------------------------------------*/
function lengthEquals(text,name,num)
{
 if(getLength(text)!=num)
 {
  alert("误?+num+"?+name+"!")
  text.focus();
  return true;
 }
}

function lengthless(text,name,num)
{
 if(getLength(text)<num)
 {
  alert(name+"不能于"+num+"?")
  text.focus();
  return true;
 }
}
function lengthmore(text,name,num)
{
 if(getLength(text)>num)
 {
  alert(name+"不能大于"+num+"?")
  text.focus();
  return true;
 }
}

/*------------------------------------------------------------
 判断bodyText输入文本是否为空Q如为空则提C?br /> bodyText-------输入文本
 使用例子onBlur="isNullBody('姓名')"
  ------------------------------------------------------------*/
function isNullBody(name)
{
  var bodyText = frames["Dvbbs_Composition"].document.body.innerText;
  if(bodyText.length==0) {
      frames["Dvbbs_Composition"].focus();
      alert(name+"不能为空!");
      return true;
  }
}


/*------------------------------------------------------------
 获取文本框长度,中文作ؓ两个字符处理
 bodyText-------输入文本
 使用例子isLengthBody(form1.name)
  ------------------------------------------------------------*/
function isLengthBody(text,name)
{
    if (text.value.length > 600) {
        frames["Dvbbs_Composition"].focus();
        alert(name+"不能过600!");
 return true;
    }
}


/*------------------------------------------------------------
 查是否含有?“号
        有,则返回true
        ? 则返回false
  ------------------------------------------------------------*/
function isTheChar(text,name)
{
    var re= /'/g;
    var arr = text.match(re);
    if (arr == null)
        return false;
    else
        return true;
}



天外飞仙 2006-09-24 16:37 发表评论
]]>
javaScript 验证 实例 http://www.tkk7.com/songfei/articles/65460.html天外飞仙天外飞仙Thu, 24 Aug 2006 02:35:00 GMThttp://www.tkk7.com/songfei/articles/65460.htmlhttp://www.tkk7.com/songfei/comments/65460.htmlhttp://www.tkk7.com/songfei/articles/65460.html#Feedback0http://www.tkk7.com/songfei/comments/commentRss/65460.htmlhttp://www.tkk7.com/songfei/services/trackbacks/65460.htmljavaScript 验证 实例


function isNum(str){
        var patrn=/^[0-9]{1,20}$/;
        if (patrn.exec(str)) return true;
        return false;
}

//校验是否是正的手机?
function isMobile(str){
        var patrn = /^((\+86)|(86))?(13)\d{9}$/;
        if(patrn.exec(str)) return true;
        return false;
}
//校验是否是正的电话?
function isTel(str){
        var patrn = /^(\d{3,4}\-)?\d{7,8}$/;
        if(patrn.exec(str)) return true;
        return false;
}

//校验Email地址是否正确
function isEmail(str){
        var patrn = /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/;
        if(patrn.exec(str)) return true;
        return false;
}


天外飞仙 2006-08-24 10:35 发表评论
]]>
手机L的javascript校验http://www.tkk7.com/songfei/articles/55618.html天外飞仙天外飞仙Wed, 28 Jun 2006 13:30:00 GMThttp://www.tkk7.com/songfei/articles/55618.htmlhttp://www.tkk7.com/songfei/comments/55618.htmlhttp://www.tkk7.com/songfei/articles/55618.html#Feedback0http://www.tkk7.com/songfei/comments/commentRss/55618.htmlhttp://www.tkk7.com/songfei/services/trackbacks/55618.htmlfunction CheckPhone85()
{

var MobileStr = document.submitform85.MobilePhone.value;
var i,j,strTemp;
strTemp="0123456789";

if(MobileStr.substring(0,2)!="13"&&MobileStr.substring(0,1)!="0")
 {
  alert ('错误Q不是有效的手机/灵?固定电话LQ?);
  return false;
 }

if (MobileStr.length<11)
 {
  alert ('错误Q手?灵?固定电话L长度不能于11Q?);
  return false;
 }

for (i=0;i<11;i++)
 {
  j=strTemp.indexOf(MobileStr.substring(i, i+1));
  if (j==-1)
   {
    alert ('错误Q手机号码不能含有字W!');
    return false;
   }
 }
return true;
}



天外飞仙 2006-06-28 21:30 发表评论
]]>
JavascriptQwindow对象的方?/title><link>http://www.tkk7.com/songfei/articles/54674.html</link><dc:creator>天外飞仙</dc:creator><author>天外飞仙</author><pubDate>Fri, 23 Jun 2006 06:51:00 GMT</pubDate><guid>http://www.tkk7.com/songfei/articles/54674.html</guid><wfw:comment>http://www.tkk7.com/songfei/comments/54674.html</wfw:comment><comments>http://www.tkk7.com/songfei/articles/54674.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/songfei/comments/commentRss/54674.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/songfei/services/trackbacks/54674.html</trackback:ping><description><![CDATA[先拷贝一份,留下慢慢研究?br /><br />open(URL,WindowName,parameterList):openҎ创徏一个新的浏览器H口Qƈ在新H口中蝲入一个指定的URL地址。?br />close():closeҎ关闭一个浏览器H口. <br />alert(text):弹出一个信息框. <br />confirm(text):弹出一个确认框. <br />prompt(text,Defaulttext):弹出一个提C框. <br />setTimeout(expression,time):定时讄,在一定时间后自动执行expression描述的代?使用time讄旉,单位是毫U? <br />clearTimeout(timer):取消以前的定时设|? <br />back():指示览器蝲入历史记录中的上一个URL地址. <br />forward():指示览器蝲入历史记录中的下一个URL地址. <br />stop():指示览器停止网늚装蝲. <br />location:提供当前H口的URL信息 <br />history:提供当前H口的历史记?可以在网导航中发挥作用. <br />closed:一个指出窗口目前是否关闭的逻辑? <br />self:引用当前文档对应的窗? <br />提示?认?输入框的用法:<br />提示?使用alert(text)Ҏ创徏,昄一条简短信?只有一个OK按钮.<br />?alert("你的输入是hello!");<br />认?使用confirm(text)Ҏ创徏,昄一条简短信?有OK按钮和Cancel按钮.<br />?confirm("认?");<br />输入?使用prompt(text,Defaulttext)创徏,昄一条信息后,用户可以在一个文本输入框中输入一定的文本.<br />?prompt("误入您的姓?",""); <br /><img src ="http://www.tkk7.com/songfei/aggbug/54674.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/songfei/" target="_blank">天外飞仙</a> 2006-06-23 14:51 <a href="http://www.tkk7.com/songfei/articles/54674.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>JavaScript和ASP.NET的传?/title><link>http://www.tkk7.com/songfei/articles/19756.html</link><dc:creator>天外飞仙</dc:creator><author>天外飞仙</author><pubDate>Mon, 14 Nov 2005 11:32:00 GMT</pubDate><guid>http://www.tkk7.com/songfei/articles/19756.html</guid><wfw:comment>http://www.tkk7.com/songfei/comments/19756.html</wfw:comment><comments>http://www.tkk7.com/songfei/articles/19756.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/songfei/comments/commentRss/19756.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/songfei/services/trackbacks/19756.html</trackback:ping><description><![CDATA[<DIV align=center><A >www.xyhhxx.com</A>  发布? seo  旉: 2005-11-10</DIV><BR>因项目需要,最q一D|间里对于js的开发有了一定的了解。在ZASP.NET的开发中Q经常性的需要JS脚本来增加一些客L的控Ӟ比如限制输入字符Q日期控件等{。一般这L控制基本上在客户端完成就比较好,无需回传到服务端。ȝ了最q的开发中使用的一些js的技巧,提供l大?<BR><BR>1、js脚本如何讉K服务器控件的?<BR>        界面上有一个TextBox控gQID为NameQjs里可以采用如下脚本取Name的?<BR>        var myvalue=document.all(’Name?.value; <BR><BR>2、服务器控g如何取js中变量的?<BR>        目前未发现比较好的办法,我通常采用?A >Ҏ</A>是在界面上放一个隐藏的控gHtmlInputHiddenQ然后设|ؓ以服务器控gq行Q这样在js脚本中和ASP.NET代码里都可以讉K到该控g的?<BR>        js中给服务器控件赋| <BR>        var btQdocument.all(’Name?.value; <BR>        bt.value=’名U? <BR>        ASP.NET中用Name.Value来访问?<BR><BR>3、如何遍历界面上所有TextBox元素 <BR>        var inputList = document.body.getElementsByTagName("INPUT"); <BR>        for(var i=0;i<inputList.length;i++) <BR>        { <BR>           if(inputList[i].disabled==false && (inputList[i].type==’text?nbsp;|| inputList[i].type==’password?) <BR>           { <BR>              inputList[i].value=""; <BR>           } <BR>        } <BR><BR>4、让dropdownlist选择到指定项 <BR>        选择dropdownlist中gؓ“我得选择”得?<BR>        var handl=document.all(’List1?; <BR>        var my_value=’我得选择? <BR>        for(var index=0;index<handle.options.length;index++) <BR>        { <BR>            if(handle.options[index].text==my_value) <BR>            { <BR>                handle.selectedIndex=index; <BR>            } <BR>        } <BR><img src ="http://www.tkk7.com/songfei/aggbug/19756.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/songfei/" target="_blank">天外飞仙</a> 2005-11-14 19:32 <a href="http://www.tkk7.com/songfei/articles/19756.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>лǵվܻԴȤ</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> վ֩ģ壺 <a href="http://lyaa17.com" target="_blank">Ƶ</a>| <a href="http://bdyls.com" target="_blank">ӰԺδʮվ</a>| <a href="http://http99.com" target="_blank">ҰƵ</a>| <a href="http://smalody.com" target="_blank">ѵɬɬƵ߲</a>| <a href="http://imfever.com" target="_blank">޳AVƬһ</a>| <a href="http://bjlfggcm.com" target="_blank">ɫĻ߲</a>| <a href="http://yangguang882.com" target="_blank">ѾþþƷѾѾ</a>| <a href="http://szqsnt.com" target="_blank">Ƶ69</a>| <a href="http://pjappuiehjdkhsjkssd2.com" target="_blank">޹㽶þþþþ</a>| <a href="http://ztxfkj.com" target="_blank">鶹avŮһ</a>| <a href="http://805ios.com" target="_blank">޾Ʒ91ר</a>| <a href="http://yeshenghuowang.com" target="_blank">þһѲ</a>| <a href="http://nonobo.com" target="_blank">zzjjzzjjƵȫ</a>| <a href="http://schygfz.com" target="_blank">ŷղ߹ۿ</a>| <a href="http://www045888.com" target="_blank">޴߶ר</a>| <a href="http://miya863.com" target="_blank">þҹӰԺѹۿ</a>| <a href="http://074g8.com" target="_blank">һ϶</a>| <a href="http://www-091w.com" target="_blank">޹avŮվ</a>| <a href="http://mhysf.com" target="_blank">йѹۿ߹ۿ</a>| <a href="http://www-887234.com" target="_blank">þõӰҹ³˿Ƭ</a>| <a href="http://qqc46.com" target="_blank">޳aƬ߹ۿ</a>| <a href="http://0827fang.com" target="_blank">av߹ۿַ</a>| <a href="http://www12kvkv.com" target="_blank">4399Ӱѹۿֱ</a>| <a href="http://www-188588.com" target="_blank">޾Ʒþþþϼ</a>| <a href="http://zbhongtai.com" target="_blank">ŷһ</a>| <a href="http://srztw.com" target="_blank">þþƷƵѲ</a>| <a href="http://3baimm.com" target="_blank">޻Ƭֻѹۿ</a>| <a href="http://www827556.com" target="_blank">ĻһԾ</a>| <a href="http://xiaojiejieav.com" target="_blank">˻վƬƵ </a>| <a href="http://46339cc.com" target="_blank">ŵ</a>| <a href="http://jastrelax.com" target="_blank">ƬѸ</a>| <a href="http://xjdz8.com" target="_blank">AV</a>| <a href="http://dazngt.com" target="_blank">޳aƬ߿</a>| <a href="http://bjtjchem.com" target="_blank">ò߹ۿ</a>| <a href="http://99880524.com" target="_blank">Ʒ޾߹ۿ</a>| <a href="http://cc88899.com" target="_blank">Ļһ</a>| <a href="http://359777b.com" target="_blank">91ƷѹƬ</a>| <a href="http://51porn3.com" target="_blank">AVר4SE</a>| <a href="http://05942688.com" target="_blank">պһѲ</a>| <a href="http://5222133.com" target="_blank">ɫɫWWW</a>| <a href="http://lai228.com" target="_blank">޹ۺ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>