[英]getting a value into my textarea
I'm using the following to set the value of a text area.. 我正在使用以下内容来设置文本区域的值。
<?php
$description=$myrow["description"];
?>
<textarea name="description" value="<?php echo htmlspecialchars($description); ?>" readonly></textarea>
but it doesn't appear to be working. 但它似乎不起作用。 The value of message is not null.
message的值不能为null。 Does anyone have any idea why it's not filling the value?
有谁知道为什么它没有填补价值?
<textarea>
does not have value
attribute like <input type="text" value="InputValue"/>
<textarea>
没有像<input type="text" value="InputValue"/>
value
属性
Do like this: 这样做:
<textarea name="description" readonly><?php echo htmlspecialchars($description); ?></textarea>
You need to put textarea value like this: 您需要这样输入textarea值:
<?php
$description=$myrow["description"];
?>
<textarea name="description" readonly><?php echo htmlspecialchars($description); ?></textarea> <!--passing the value between opening and closing textarea tags.-->
Try This 尝试这个
<?php
$description=$myrow["description"];
?>
<textarea name="description" readonly><?php echo htmlspecialchars($description); ?></textarea>
try this: 尝试这个:
<textarea name="description"><?php echo htmlspecialchars($description); ?></textarea>
textarea value not defined using value property like value ="value" you need to do like
<textarea> value </textarea>
未使用值属性(例如值=“ value”)定义的textarea值,您需要像
<textarea> value </textarea>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.