answersLogoWhite

0


Best Answer

You can call an external javascript file or javascript code located inside the head or body tag from a form using event handlers. I am not sure if you can or cannot use javascript code inside form tags but am sure that it is not a good programming practise to put code of two different language (js & html) together

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you use JavaScript within the form tag?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Which tag is used to implement javascript in an HTML file?

The SCRIPT tag is used to implement a JavaScript (or other kind, i.e. VBScript) in an HTML document. The tag can either contain the actual JavaScript code, or can point to an external script file that should be included at render-time. To add JavaScript directly to the document in HTML 5, place these tags in either the HEAD section or just prior to the BODY sections closing tag. <script type="text/javascript"> //JS code goes here </script> To call an external JavaScript file, use the "src" attribute, like so: <script type="text/javascript" src="path/to/script.js"></script> If you're unsure of where to put the JavaScript tags, see the related answer(s).


How can we use script tag in java?

to implement javascript embed the statements between <script> n </script>,,, and include any scripting language. eg:<script LANGUAGE="javascript"> block of codes </script>


What element do you use to add JavaScript code to a web page and how is it structured?

To add javascript code in HTML, you have to include the script tag on top. It can be added as <script src="source of script"></script>


How you can use jquery in HTML?

jQuery is like JavaScript, you can code inside your html file using the <script> tag. Or you can use an include tag and call an external sheet with your jQuery code.


Whose tag used in HTML for image display one by one after few seconds?

This cannot be accomplished with HTML. You may need to use JavaScript to accomplish this effect.

Related questions

Which tag is used to implement javascript in an HTML file?

The SCRIPT tag is used to implement a JavaScript (or other kind, i.e. VBScript) in an HTML document. The tag can either contain the actual JavaScript code, or can point to an external script file that should be included at render-time. To add JavaScript directly to the document in HTML 5, place these tags in either the HEAD section or just prior to the BODY sections closing tag. <script type="text/javascript"> //JS code goes here </script> To call an external JavaScript file, use the "src" attribute, like so: <script type="text/javascript" src="path/to/script.js"></script> If you're unsure of where to put the JavaScript tags, see the related answer(s).


How can we use script tag in java?

to implement javascript embed the statements between <script> n </script>,,, and include any scripting language. eg:<script LANGUAGE="javascript"> block of codes </script>


Can you use body tag and form tag together in HTML?

If you want to maintain W3C compliance, you can't use the FORM tag without the BODY tag. The FORM tag must be contained within the BODY tag. Like this <html> <head> <title>Our Cool Form Page</title> </head> <body> <form method="post" action="example.php"> <input type="submit" value="submit"> </form> </body> </html>


What element do you use to add JavaScript code to a web page and how is it structured?

To add javascript code in HTML, you have to include the script tag on top. It can be added as <script src="source of script"></script>


How you can use jquery in HTML?

jQuery is like JavaScript, you can code inside your html file using the <script> tag. Or you can use an include tag and call an external sheet with your jQuery code.


Whose tag used in HTML for image display one by one after few seconds?

This cannot be accomplished with HTML. You may need to use JavaScript to accomplish this effect.


What three tags create the body of the form in HTML?

A form can be created in HTML using the <form> tag. Inside form tag we can use elements like input, submit or reset.


How do you create a registration form using css and javascript in HTML?

Form is an HTML construct. The first part tells the server to Get or Post. To format with CSS is one thing, to make it interactive, use JavaScript. I will give a URL below:


Can you use javascript in Mozilla?

Yes. In fact, you can use JavaScript in any web browser.


How do you use tag mode on spirit tracks?

you have to be within 30 feet of someone eles with spirt tracks also on tag mode


How do you use javascript in aspnet?

Ajax, I believe uses JavaScript + ASP.


How do you create a webpage that needs a survey to get in?

To create a webpage that requires a survey to grant access, you can use a combination of HTML for the webpage structure and JavaScript for form validation and survey submission. Set up the survey questions within a form element on the webpage and use JavaScript to check the survey responses before allowing access to the rest of the page’s content. Consider using server-side scripting (e.g., PHP, Node.js) to handle the form submission and authenticate users based on their survey responses.