运行 ❯
获取您
自己的 PHP
服务器
×
更改方向
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <?php $x = " Hello World! "; echo trim($x); ?> <p>The whitespaces are invisible in plain HTML,<br> but check out the difference in two input fields:</p> <?php echo "<input value='" . $x . "'>"; echo "<br>"; echo "<input value='" . trim($x) . "'>"; ?> </body> </html>
Hello World!
空白在纯 HTML 中是不可见的,
但是请查看两个输入字段中的区别