استفاده از textarea بدون نیاز به خرید جاوا اسکریپت
توسط : علیرضا آهنی
در تاریخ : يكشنبه, ۱۹ مرداد ۱۳۹۹، ۰۷:۴۰ ب.ظ
css زیر رو وارد قالبتون بکنید :
#input {
width: auto;
direction: ltr;
-moz-appearance: textfield;
-webkit-appearance: textfield;
background-color: white;
background-color: -moz-field;
border: 1px solid darkgray;
box-shadow: 1px 1px 1px 0 lightgray inset;
font: -moz-field;
font: -webkit-small-control;
margin-top: 5px;
padding: 2px 3px;
width: 398px;
}
#textarea {
width: auto;
direction: ltr;
-moz-appearance: textfield-multiline;
-webkit-appearance: textarea;
border: 1px solid gray;
font: medium -moz-fixed;
font: -webkit-small-control;
height: 100px;
overflow: auto;
padding: 2px;
resize: both;
}
width: auto;
direction: ltr;
-moz-appearance: textfield;
-webkit-appearance: textfield;
background-color: white;
background-color: -moz-field;
border: 1px solid darkgray;
box-shadow: 1px 1px 1px 0 lightgray inset;
font: -moz-field;
font: -webkit-small-control;
margin-top: 5px;
padding: 2px 3px;
width: 398px;
}
#textarea {
width: auto;
direction: ltr;
-moz-appearance: textfield-multiline;
-webkit-appearance: textarea;
border: 1px solid gray;
font: medium -moz-fixed;
font: -webkit-small-control;
height: 100px;
overflow: auto;
padding: 2px;
resize: both;
}
حالا هرجایی که از کد زیر استفاده کنید دارید از textarea استفاده میکنید:
<div id="textarea">
</div>
</div>
البته این فقط شکلش رو تغییر میده وگرنه قابلیت های خود textarea رو نداره.
متنتون باید بین textarea باشه.
اگر قبلا در بیان ثبت نام کرده اید لطفا ابتدا وارد شوید، در غیر این صورت می توانید ثبت نام کنید.