You can simulate a text input like this:
<textarea rows="1" cols="40" style="overflow:hidden;">
WhateverTextYouLike
</textarea>
You can simulate a button input like this:
<button>
MoreTextYouLike
</button>
Does the textarea and button tags need to be inside a form tag?
BTW, I did test the original code in Netscape (it was either 6.1.2 or 6.2.1 - it's at work) and it worked fine. Perhaps it would choke on earlier versions. I'm just hesitant to leave it as is as it seems like it could rear it's ugly head sometime/somewhere and cause me grief.
That's what's so good about <button>I'm a button!</button> and <textarea>Please write something here...</textarea>. They can be used anywhere--one problem. I just found out that <button> is only IE 4+ and NS 6+. Too bad...At least <textarea> was on both IE 1 and NS 1. That can be used fine anywhere. If I have helped you just click the first link below to let me know
That's the thing. All <input>'s work in IE 6.0 for me(and earlier versions of IE too, I think). It's just that we're looking for things that will work in earlier NS editions.
Rick If I have helped you just click the first link below to let me know
The thing is, all of these elements where originally intended solely for use in forms (except button? it was made later i think). Thus, older browsers may not support them without the <form> element as a parent. But then, why does this matter so much? Just include <form> and </form> anyways... they don't change anything the functioning of your page!
However, in answer to scc's fears, there is really no need to worry about the use of these elements for future browsers, since nowadays they are used with client-side scripts more often than with traditional form processors (ie. CGI, perl, etc.). All new browsers will recognize this and thus not require them to be part of an official form. "Insofar as the propositions of mathematics refer to reality they are not certain, and insofar as they are certain they do not refer to reality." -- Albert Einstein
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.