0

Hello,
How can i replace a button by an image?
Here is my code:

    <INPUT TYPE="butt    <INPUT TYPE="button" NAME="insert" VALUE="Gras" onClick="this.form.area.value=this.form.area.value.concat('<b>Ajouter votre texte en gras ici</b>');">insert" 

Thank you,
Sanchixx

3
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by memomk
0

try this

<script type="text/javascript">
function show(){
document.getElementById("1").innerHTML="<img src='http://example.come/image.jpg' />";}
</script>
<div id="1"><input type="button" value="click to show the image" onclick="show()" /></div>

for more go to
w3schools

0

That not what i meant i want that when you click on an image this happens

onClick="this.form.area.value=this.form.area.value.concat('<b>Ajouter votre texte en gras ici</b>');">insert" 
1

Hy,
If you want to use an image as button, try this code:

<input type="image" src="image.jpg" alt="Gras" onClick="this.form.area.value=this.form.area.value.concat('<b>Ajouter votre texte en gras ici</b>');" />
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.