total.jsp <html>
<script>
window.onload = function()
{
    document.getElementById("secend").src = "secend.htm";//为secend的SRC赋值
}</script>
<FRAMESET   rows= "10%,* "   border=0> 
<frame     noresize   name= "title" /> 
<FRAMESET   rows= "72%,* "   border=0> 
<frame src= "first.htm" noresize name= "first" /> 
<frame name="secend" id="secend"  /> <!--给secend加上ID的属性,初始时去年SRC的值-->
</FRAMESET> 
</FRAMESET> 
</html>
first.jsp的javascript去掉不要secend.jsp的javascript<body>
<script>
function CheckEnterKey()     
{     
//alert(window.event.keyCode);     
if(top.frames["first"].event.keyCode == 13) //13为回车键的响应码     
{
    alert( "welcome   first "); 
    top.frames["first"].event.keyCode=0 ;                           
}     

window.onload = function()
{
    top.frames["first"].document.onkeydown=CheckEnterKey;
}
</script>
</body>