Off the top of my head, you could do something like...
Of course, there are a few things to bear in mind
Displaying form results with HTML and CSS only
It's possible to display form results using only HTML and CSS with clever use of the
Click for a live demo. (Type in the box in the 'Result' window and click "Submit".)
How it works
You might be able to understand it from the commented CSS code above, but, in case you want a full explanation, read on.
First, the form's submit button has an invisible link above it that we style with CSS:
When the user clicks the "Submit" button, they're actually clicking the invisible link above it; the user never hits the Submit button and the form itself is never submitted.
What happens instead is that, when the link over the submit button is clicked, the url changes from
And so, when the link is clicked and the user is redirected to #page, we show the 'You typed:' text, hide the submit button, and change the input box styling to show them what they typed. All of this is done using the
The CSS rule that looks like
Next, the line that looks like
Finally, the line that looks like
This could be extended with multiple inputs if required, but I've used one to keep it simple.
Note that browser support for the CSS
After these steps you should see the form's output in your browser's console. You can then take the output from
protected by John Conde♦ Oct 10 at 20:19
Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?