<%@ page language="java" import="java.util.*" contentType="text/html;charset=GBK"%>
<html>
<head>
<%
String uName = (String)session.getAttribute("loginName");
 %>
<title>无标题文档</title>
<script type="text/javascript" src="/company/fckeditor/fckeditor.js"></script>
<script>
function btn(){
var num=0;
if(num=0){
num=1;
return false;
}
document.getInput.info.value = document.getInput.content.value; 
document.getInput.content.value ="";

return true;
}</script>
</head><body style="width:750px;">
<form method="post" action="../Manage/doMain.jsp" target="left" name="getInput" onSubmit="return btn()">
<input type="hidden" name="uName" value="<%=uName%>">
<input type="hidden" name="info" value=""><P align="center">请输入发送信息:    
<script type="text/javascript">
window.onload = function()
{
var oFCKeditor = new FCKeditor( 'content' ) ; //产生FCKeditor对象
oFCKeditor.BasePath = "/company/fckeditor/";
oFCKeditor.Width="580";//设置宽度 
oFCKeditor.Height="200";//设置高度
//oFCKeditor.ToolbarSet="myDefault"//设置工具条
oFCKeditor.ReplaceTextarea() ;
}
</script>
<textarea rows="2" style="width:580px" name="content" ></textarea>
<input type="submit"  value="发送"></P>
</form>
</body>
</html>

解决方案 »

  1.   

    一直return true;
    肯定就跳转了呀
      

  2.   

    var num=0;
    if(num=0){
    num=1;
    return false;
    }
    你的函数一进来就return false了, 你下面的代码都白写的   这里改下
      

  3.   


    function btn(){
    var num=0;
    if(num=0){//这里错了吧,num ==0
    num=1;
    return false;//程序永远成立,return结束程序,删除就可以情况了
    }
    document.getInput.info.value = document.getInput.content.value;  
    document.getInput.content.value ="";return true;
    }