Button press & release actions (php) -


i want create button press & release actions, so, example, when press it, shows text , when release it hides text. can help? have tried:

    <form action="forwardon.php" method="get">      <input type="submit" value="forward">     </form> 

this creates button redirects page running desired action: cant create press & release actions this..

and cant find way how this.. or not possible php?

well, yes. it's not possible php, need use javascript that.

every button has events: onmousedown , onmouseup. can see list of events here

basically, need create functions, fired in javascript while pressing/releasing. this

<html> <-- html here --> </html> <script>     document.getelementbyid('id-of-your-button')         .addeventlistener('mousedown', function() {             //change text need here pure javascript         }); </script> 

the same goes onmouseup event too.

to know more javascript visit w3schools


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -