Hi, there. A question about web development.
I'm using the jquery to try the reset method in an input form in the PHP file but it didn't work. Here is a part of my code.
<div id='signbox' class='modal-window'>
<form id= 'signF' method='post' action='centerControl.php'>
...
<input id='resetSign' type='button' value ='Reset'>;
...
</form>
</div>
<script>
$(document).ready(function(){
$("#resetSign").click(function(){
$("#signF")[0].reset()
});
});
</script>
And one more question that I'm a new player so what kind of tool I can check all my jquery PHP and HTML syntax error? Thank you.
This code is working fine and you should check that jQuery is added in your PHP file.
It looks like jQuery is not added in the file. So the code is not running.
If not, add this script tag in your file and make sure the internet is on.
<script src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
</script>
To check jquey is added or not
Press right click on the browser and select inspect
then a window is open in the right side of the browser which looks like-
Select console to see the JavaScript and jQuery errors.
Select Elements to see if there is an error in HTML syntax.
PHP errors shown in the bowser screen when u refresh the page.
Get Answers For Free
Most questions answered within 1 hours.