首页 > 解决方案 > JavaScript 输入按钮未按预期工作

问题描述

我有一个如下所示的 JSP 页面:

在此处输入图像描述

当我单击编辑按钮时,单词Edit:advance configuration显示在当前窗口下方。多按几次按钮只会触发 call editUrl.jsp

如下所示:

在此处输入图像描述

我真的很困惑为什么它的行为方式如此。

这是我单击编辑按钮时的函数调用:

 function editURL(){




                    $('body').pWin("open", {
                        x: 260,
                        y: 47,
                        height: 450,
                        width: 881,
                        title: "Edit:Advance configuration",
                        skinMode:'dialog',
                        iframe:true,
                        url: "editUrl.jsp",
                        data: {





                        },
                        offResize:true,
                        offMove:true,
                        onTitle:false,
                        offBottom:true
                    });




                }

还有我的editUrl.jsp:

<head>
    <title>Edit:Advance Configuration</title>

    <%

        String relPath = "../../../";


    %>

    <script type="text/javascript" src="<%=relPath%>js/jquery/jquery-1.3.2.js"></script>
    <script type="text/javascript" src="<%=relPath%>js/jquery/jquery-panton-win.js"></script>
    <script type="text/javascript" src="<%=relPath%>js/jquery/jquery-panton-win-2.js"></script>

    <style>

        body {
            font-family:"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif;
            font-size:12px;
            overflow:hidden;
        }
        legend {
            font-family: 'Trebuchet MS';
            font-size:12pt;
            padding:0px 5px 0px 5px;
        }

        fieldset {
            -moz-border-radius:10px;
            border:1px solid lightgrey;
        }



        label{
            display:block;
            font-weight:bold;
            text-align:right;
            width:140px;
            float:left;
            font-size:12px;
        }
    </style>


</head>
<body>


<%out.print("testststs\n");

    out.print("testststs\n");

    out.print("testststs\n");

    out.print("testststs");



%>







</body>

是不是我做错了什么?我只想单击编辑按钮,然后它应该打开相同的窗口大小并“覆盖”当前窗口。

标签: javascripthtmlcss

解决方案


推荐阅读