可以用value=“block”这个属性将行内元素转换成块级元素么?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>display</title>
<script type="text/javascript">
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display="none"
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display="block"
}
</script>
</head>
<body>
<h1>JavaScript</h1>
<p >做为一个Web<span id="con">开发师</span>来说,如果你想提供漂亮的网页、令用户满意的上网体验,JavaScript是必不可少的工具。</p>
<form>
<input type="button" onclick="hidetext()" value="隐藏内容" />
<input type="button" onclick="showtext()" value="显示内容" />
</form>
</body>
</html>