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

Recommended Answers

All 4 Replies

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

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" 

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>');" />

oh sorry i didn't understand what u ment :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.