两个按钮以相同的形式

时间:2014-01-04 13:48:59

标签: javascript html servlets

我有两个相同形式的按钮,每个按钮都应该带我到另一个servlet(.java)。 有任何想法吗?! onClick = response.sendRedirect无效!!!!

这是代码:

            "<button type =\"button\""+
            "class=\"textenormal\" onClick=\"response.sendRedirect('http://localhost:8080/SiteFinal/AjoutNouveauHoraire');\""+
            "style=\"background-color: #99AABB; color: 'black'; height: '35px'; margin-top: '5px'; margin-bottom: '5px'; width: '400px';\""+
            "onmouseover=\"this.style.cursor='hand';this.style.fontWeight='bold';this.style.borderWidth='1px';this.style.borderStyle='groove';\""+
            "onmouseout=\"this.style.fontWeight='normal';this.style.borderStyle='none';\">"+
            "Vous desirez Enregistre l'horaire dans un autre Cursus <br/>"+
            "ou/et avec un autre Enseignant?"+
            "</button>"+    
            "</td>"+
            "</tr>"+
            //"</Form>"+
                "<tr bgcolor=\"#F1F1E4\">"+
                "<td colspan=\"2\" align=\"center\""+
                    "valign=\"middle\" bgcolor=\"#FFFFFF\""+
                    "class=\"textenormal\">"+
                    "<input type =\"button\" value=\"Enregistrer\" "+
                    "class=\"textenormal\" "+
                    "onClick=\"response.sendRedirect('http://localhost:8080/SiteFinal/EnregistrerHoraire');\" "+
                    "style=\"background-color: #99AABB; color: 'black'; height: '20px'; margin-top: '5px'; margin-bottom: '5px'; width: '180px';\""+
                    "onmouseover=\"this.style.cursor='hand';this.style.fontWeight='bold';this.style.borderWidth='1px';this.style.borderStyle='groove';\""+
                    "onmouseout=\"this.style.fontWeight='normal';this.style.borderStyle='none';\">"+
                    "<input type =\"reset\" value=\"Reset\""+
                    "class=\"textenormal\""+
                    "style=\"background-color: #99AABB; color: 'black'; height: '20px'; margin-top: '5px'; margin-bottom: '5px'; width: '180px';\""+
                    "onmouseover=\"this.style.cursor='hand';this.style.fontWeight='bold';this.style.borderWidth='1px';this.style.borderStyle='groove';\""+
                    "onmouseout=\"this.style.fontWeight='normal';this.style.borderStyle='none';\">"+
                "</td>"+

0 个答案:

没有答案