為什么一模一樣的代碼,我用DW就是顯示不出來(lái),這個(gè)是腫么回事,求解
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無(wú)標(biāo)題文檔</title>
</head>
<body>
<script type="text/javascript">
var ?otest=document.getElementById("test");
var newnode=document.createElement("li");
newnode.innerHTML="php";
otest.insertBefore(mewnode,otest.lastChild);
</script>
</body>
</html>
2016-06-21
親,單詞拼寫錯(cuò)誤 ? ?otest.insertBefore(mewnode,otest.lastChild); 這里面應(yīng)該是newnode
2022-03-24
你沒(méi)子節(jié)點(diǎn)如果獲取nodeValue?你直接獲取body的nodValue嗎?具體要看你寫的CSS,有可能你的body上面被div覆蓋了