Bonjour j'ai utilisé java script pour creer un boutton qui permet d'effacer le contenu d'un text area mais il ne fonctionne lorsque j'appuie dessus...SVP est ce que vous me dire pourquoi..voici le code que j'utilise:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
 
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
 
 
  <jsp:useBean id="mybean" scope="page"  class="Projet.Prog1" />
 <jsp:setProperty name="mybean" property="*"  />
 
   <%String number=request.getParameter("textarea");
    mybean.setTextarea(number);%>
    <%String chaine=request.getParameter("textarea2"); %>
 <HTML>
<HEAD>
<TITLE>service simulator</TITLE>
<SCRIPT LANGUAGE="JavaScript">
 
 
 function Effacer(textarea) {
	textarea.options.value="";
	}
 
</SCRIPT>
 
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="490" height="549" border="0" align="center" background="../images/interface2.gif" >
  <tr>
    <td width="484" height="543"><form name="form1" method="post" action="">
 
        <div align="center">
          <p><textarea name="textarea" cols="40" rows="3"></textarea>
          </p>
          <p>
            <textarea name="textarea2" cols="40" rows="3" ><%=mybean.getTextarea2(chaine)%></textarea>
 
          </p>
        </div>
      <table width="432" border="0">
        <tr>
          <td width="302"><div align="center">
            <input type="submit" name="Submit" value="SEND">
          </div></td>
          <td width="120"><input type="button" name="Submit2" value="ERASE" onClick="Effacer(this.form.textarea2)"></td>
        </tr>
      </table>
 
    </form></td>
  </tr>
</table>
<!-- ImageReady Slices (Untitled-1.html) -->
 
</BODY>
</HTML>