Computer Science, asked by ankit321, 1 year ago

difference between SIZE and MAXLENGTH attributes of the text type?????

Answers

Answered by Anonymous
5
Maxlength specifies the maximum length of input characters  It is NOT meant to act as a security measure. On the other hand, Size attribute does not refuse inputs of these characters, it is for visual rendering only..

For. e.g- 
(Note- his is for entering an email)

<input type="text" name="email" maxlength="40" size="10">

So, if a user inputs more than 10 characters for their email address, the field begins to scroll while they type.

Hope this helps ya..!!

ankit321: Is this not copied?????
Anonymous: no it's not..if it looks like one, i'm sorry for that
Anonymous: and..after note i wanted to type 'this'
ankit321: Ooohhhk
Answered by ABHIJEETANDKUSHAL
2

Explanation:

Size:- specifies the length of the input field and characters this means how many letters should be visible in the text box.

Max Length:-specifies the maximum numbers of characters of textbox can accept if maxlength 5 then you will not be allowed to enter the 6th letter

Similar questions