placeholder中实现换行

                                                                           placeholder中实现换行

1、效果

2、代码

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>placeholder中实现换行</title>
	<style>
		textarea{
			width:400px;
			height:180px;
		}
	</style>
</head>
<body>
<xmp>
	&#13; 表示回车
	&#10;表示换行
</xmp>
<textarea placeholder='变量格式:&#13;&#10;[{"value":"phone","name":"电话"},{"value":"name","name":"用户名"}]'></textarea>
</body>
</html>
发布了223 篇原创文章 · 获赞 36 · 访问量 15万+

猜你喜欢

转载自blog.csdn.net/qq_36025814/article/details/103834465