-5

I have an h1 header on my page that simply says "Hello world".

I want to know how I can add a form to change the header to say "Hello world from my_form_field_value".

gung - Reinstate Monica
  • 11,583
  • 7
  • 60
  • 79
  • 1
    Use punctuation **PLEASE**. I don't understand **AT ALL** what you are trying to ask. – Sifu Aug 04 '14 at 16:57

2 Answers2

0

This question is horribly phrased so I'm afraid I will answer your question with other answers.

What I believe you want is on input change, you want to capture the change (Detecting input change in jQuery?) and update the h1 text: $("h1").text("newString");

(that will only work with jquery included)

Community
  • 1
  • 1
user3047190
  • 319
  • 2
  • 7
0

It depends on the technology you are using (jQuery, ASP(.NET), PHP, etc).

user3047190's answer used jQuery (client side solution). If using a server side solution, you can have the form send a querystring containing the text to the server and return a page with the text you just typed in.

Here's an online example: http://html.net/tutorials/asp/lesson11_ex1.asp

Here's the tutorial explaining the above classic ASP example: http://html.net/tutorials/asp/lesson11.asp

vjy_khn
  • 16
  • 1