I have textarea to provide user add article, if user seem font too small in textarea, user can click button to increase font size to 16 px or increase to 10 px, and user can preview article by click preview
I'm modify my code to view simple like this
I have 2 problem with this codePHP Code:<html>
<head>
<style>
TEXTAREA {
font-family:MS Sans Serif;font-size:10px;
}
</style></head>
<body>
<form action="<? echo $PHP_SELF; ?>" method="post" name='b'>
<form name='b'>
<table width=100%>
<tr><td>
<textarea name="a" cols=100 rows=20></textarea> <br><br>
</td></tr>
<tr><td>
<input type="button" value='increase font' onClick='document.b.a.style.fontSize = 16'>
<input type="button" value='decrease font' onClick='document.b.a.style.fontSize = 10'><br>
<input type=submit value=preview>
<input type=submit value=add>
</td></tr>
</table>
</form>
</body></html>
1. If i'm click increase font to 16 px, the size of text is exceed border of table. How should I do?
2. If I'm increase size to 16px and click preview, when it load again, font it textarea remain 10px (instead 16 px) How shold I do?
Thanks.





Bookmarks