日期:2014-05-18  浏览次数:20743 次

一个js脚本的问题
<html>
<head>
<title> 加中科技医院信息系统 </title>
<link   rel= "stylesheet "   href= "inc/style.css "   type= "text/css ">
<script   language= "javascript "   src= "inc/select_date.js "   charset= "utf-8 "> </script>
<script   type= "text/javascript ">
var   str=0;
function   getdate(temp)
{
for(m=1;m <document.all.table1.rows.length;m++)
{
var   str=document.all.table1.rows[m];
for(n=0;n <str.cells.length;n++)
{
str.cells[n].className= "row ";
}
}
for(i=0;i <temp.cells.length;i++)
{
temp.cells[i].className= "clickchoose ";
str=temp.rowIndex;
alert(str);
}
parent.window.frames[ "aa "].location.href= "yClinicReckQueryFindOne.do?rcptNo= "+temp.cells[0].innerHTML;
parent.window.frames[ "bb "].location.href= "yClinicReckQueryFindTwo.do?rcptNo= "+temp.cells[0].innerHTML;
}

function   keydownPlus() <%--处理快捷键。ywang1230--%>
{
if(window.event.keyCode==40)
{
str++;
alert( "keydown "+str);
if(str <document.all.table1.rows.length)
{
getdate(document.all.table1.rows[str]);
}
else
{
getdate(document.all.table1.rows[1]);
str=1;
}
}
}
document.onkeydown=keydownPlus; <%--处理快捷键。ywang1230--%>
</script>
</head>
<body>
<table   align= "center "   cellpadding= "0 "   cellspacing= "1 "   class= "tableBorder "   id= "table1 "   name= "table1 "   width= "100% ">
<tr>
<td   height= "30px "   align= "center "   class= "td ">
收据号
</td>
<td   height= "30px "   align= "center "   class= "td ">
病人姓名
</td>
<td   height= "30px "   align= "center "   class= "td ">
费别
</td>
<td   height= "30px "   align= "center "   class= "td ">
应收
</td>
<td   height= "30px "   align= "center "   class= "td ">
实收
</td>
<td   height= "30px "   align= "center "   class= "td ">
交费标志
</td>
<td   height= "30px "   align= "center "   class= "td ">
退费收据号
</td>
</tr>
<logic:present   name= "list ">
<logic:iterate   id= "element "   name= "list ">
<tr   align= "center "   onclick= "getdate(this) ">
<td   class= "row "   height= "30 "> <bean:write   name= "element "   property= "rcptNo "   /> </td>
<td   class= "row "   height= "30 ">
<bean:write   name= "element "   property= "name "   />
</td>
<td   class= &qu