Skip to main content

Posts

Showing posts with the label javascript

HTML <textarea> maxlength problem

We can limit the maximum characters in <input> with <maxlength> attribute. However it is not possible to do the same thing with <textarea> . This will be a problem if value of the <textarea> will be stored into database table and the length of the user input exceeds the field's length, either the value will be truncated or your database will throw an error to you.

HTML <input> tips - 01

Beberapa tips yang berguna untuk penggunaan <input> pada html. Membatasi jumlah character maksimal yang boleh diinput. Gunakan attribute maxlength . Contoh: <html> <head> </head> <body> Input ini hanya dibatasi 5 character saja <input type="text" maxlength="5"> </body> </html>