javascript添加p元素,html添加文字,appendChild。
网页添加p元素效果截图。
个人签名:游志勇,预制板,南托岭预制场。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=200px,height=320px, initial-scale=1.5, minimum-scale=1.5, maximum-scale=3.0, user-scalable=yes"/>
<title>文字展示</title>
</head>
<style>
#wordsadd{
font-size:70px;
word-break: break-all;}
#wordsadd p{
margin:0 0 2px 0;
padding:0 0 2px 0;
line-height:93%;
}
.btn_width{width: 90px;}
.nodisplay{display:none;}
</style>
<script type="text/javascript" >
function wordsadd_fnbr(x,y){
var x_id = document.getElementById(x).value;
//wo_cott=wo_cott.replace(/\r{0,}\n/g,"<br>");
var a_sentences= new Arra