Answer the question
In order to leave comments, you need to log in
How to change image coordinates in javascript?
Hello! I have a question for you: I need to change the coordinates of an image that I inserted using a tag and edited in a css file using javascript, how can I do this?
My code:
<div id="box1" onclick="show_text('box1');">
<img src="box1.png">
box1 = document.getElementById('box1');
function show_text(button_id)
{
if(button_id == 'box1')
{
document.getElementById('text').innerHTML = '<p>Текст</p>';
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question