BoeNoe BoeNoe - 9 days ago 8x
HTML Question

How to make a button clickabled when hovered over

This question is going to sound strange to many of you. I need a button where it can't be triggered by a click. That means it won't do an action. Like if the form attribute

is set to something like
the click won't cause it to go to the next page.

And when the user hovers over the button, it can go to the next site. The reason why I am doing this is because a bot can submit data without hovering over the button. I am hoping this will prevent bots from submitting anything into my site.

I don't really have any code, but is there any way to do this in Javascript/jQuery?

If this confusing please ask more questions in the comments and I will try to answer to the best of my capabilities.


Now I am not sure how effective this technique would be at blocking bots. If you still want to give it a go, I'd do something like this:


<form class="form" action="1.php" type="post">
  <input type="text">
  <input class="submitbutton" type="submit">


var $form = $('.form'),
    $btn = $('.submitbutton');

// Disable submit button on page load

// Reactivate submit button on form hover
  }, function(e){

I put together an example at JSFiddle.