Sign Up-6ren">
gpt4 book ai didi

php - 我如何调整表单输入字段的大小

转载 作者:太空宇宙 更新时间:2023-11-04 01:26:39 25 4
gpt4 key购买 nike

我只想使用 textarea 调整我的表单输入的大小,但我的代码无法获得更好的输出:

<html>

<head>
<form role="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="signupform">
<fieldset>
<legend>Sign Up</legend>

<label for="name">message</label>
<textarea input type="text" name="message" placeholder="Enter your message" cols="20" rows="20" required value="<?php if($error) echo $message; ?>" </span>
</div>

<label for="name">number</label>
<textarea input type="text" name="number" placeholder="input number" cols="20" rows="20" required value="<?php if($error) echo $number; ?>" </
textarea></span>
</div>

<input type="submit" name="signup" value="Sign Up" />
</div>
</fieldset>
</form></body>
</html>

提前致谢

最佳答案

Textarea 没有值属性...

像这样提供值(value)

<html>
<head>
</head>
<body>
<form role="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="signupform">
<fieldset>
<div>
<legend>Sign Up</legend>
<label for="name">message</label>
<textarea input type="text" name="message" placeholder="Enter your message" cols="20" rows="20" required><?php if($error) echo $message; ?></textarea>
</div>
<div>
<label for="name">number</label>
<textarea input type="text" name="number" placeholder="input number" cols="20" rows="20" required ><?php if($error) echo $number; ?></textarea>
</div>
<div><input type="submit" name="signup" value="Sign Up" /></div>
</fieldset>
</form>
</body>
</html>

关于php - 我如何调整表单输入字段的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47938939/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com