How to use output element? Give an example.



How to use output element? Give an example...

Answer / Kiran Kumari

The <output> element in HTML is used to display the result of a calculation or user interaction, such as with JavaScript. Here's an example using the value attribute of a button and a JavaScript function:n<button onclick="myFunction()">Click me</button>n<p><output id="result"></output></p>n<script>n function myFunction() {n document.getElementById("result").value = "Output from the function";n }n</script>

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More HTML DHTML Interview Questions

What Difference between FontSize and Font Size in DHTML?

1 Answers   Microsoft,


What is a html link?

1 Answers  


Write a background color in html?

1 Answers  


What is a title tag?

1 Answers  


What is an inline text?

1 Answers  


What are the steps of server side scripts for SSE?

1 Answers  


How do I remove the border around frames?

1 Answers  


How do you type a tag?

1 Answers  


What is hyperlink in html?

1 Answers  


What is xhtml used for?

1 Answers  


How do I become a web developer?

1 Answers  


What does it mean when code is deprecated?

1 Answers  


Categories