سؤال

Is it possible to generate a form in html that allows the text that's input to be sent to the address bar?

هل كانت مفيدة؟

المحلول

Sure is, you just make sure the forms METHOD is set to GET:

<form id="myForm" method="GET">
//Form Stuff
</form>

Take a look here for more information

نصائح أخرى

Without any testing and going off the top of my head, this should do the trick (messily):

<form onsubmit="window.location = document.getElementById('addressfield').value; return false;">
   <input type="text" id="addressfield" />
</form>
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top