Enter the global link to the button that was clicked in the event handler for clicking the corresponding button and is compared with it in subsequent runs. Code example:
<script type="text/javascript">
var prevButton = null;
.
.
.
.
function play(el)
{
if(el == prevButton)
{
}
else
{
}
prevButton = el;
}
.
.
.
function stop(el)
{
if(el == prevButton)
{
}
else
{
}
prevButton = el;
}
.
.
.
</script>
<input type="button" value="Play" onClick="play(this)"/>
<input type="button" value="Stop" onClick="stop(this)"/>
source
share