我网站编程基本不大会。
现在用dreamweaver编了一个网站的架构 然后想把之前编的javascript程序添加进去, 但是再打开网页的时候就不能运行那个javascript了。 单独的时候是可以运行的。 请大神们帮忙给看看 谢谢了 下面是我的代码
<!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">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>F-Droid</title>
<link rel="stylesheet" href="2col_leftNav.css" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {font-size: xx-large}
-->
</style>
<SCRIPT>
var xmlDoc = new ActiveXObject("microsoft.xmldom")
xmlDoc.async=false
xmlDoc.load("fdroid.xml")
root=xmlDoc.documentElement
newHTML=""
function start(){
buildTree(root)
content.innerHTML=newHTML
}
function buildTree(passedNode){
var children = passedNode.childNodes.length
for (var j=0; j<children; j++){
Node=passedNode.childNodes.item(j)
if (Node.nodeName=="application"){ newHTML+=("<div class="story"><P>"+Node.nodeName+" "+j) }
if (!Node.hasChildNodes()){
if(Node.parentNode.nodeName == "name"){
newHTML+=( "<BR><B>"+Node.parentNode.nodeName+":</B> "+Node.text )}
else if (Node.parentNode.nodeName =="icon"){
newHTML+=("<BR><img src=\icons\" +Node.text +"></div>" )}
}
buildTree(Node)
}
}
window.onload = start;
</SCRIPT></head><BODY>
<!-- The structure of this file is exactly the same as 2col_rightNav.html;
the only difference between the two is the stylesheet they use --><div id="masthead">
<h1 id="siteName">F-Droid</h1>
</div>
<!-- end masthead -->
<div id="content">
<h2 id="pageName">HomePage</h2>
<div class="feature"> <img src="file:///C|/Users/lenovo/Documents/T-Droid/cropped-fdroidheader.jpg" alt="" width="331" height="112" />
<h3>F-droid</h3>
<p>. find the application you want!!! </p>
</div>
<div class="story"></div>
</div>
<!--end content -->
<div id="navBar">
<div id="search">
<form action="#">
<label>search</label>
<input name="searchFor" type="text" size="10" />
<input name="goButton" type="submit" value="go" />
</form>
</div>
<div id="sectionLinks">
<ul>
<li><a href="#" class="STYLE1">首页</a></li>
<li><span class="STYLE1"><a href="#">热门</a></span></li>
<li><span class="STYLE1"><a href="#">趋势</a></span></li>
</ul>
</div>
<div class="relatedLinks">
<h3>分类</h3>
<ul>
<li><a href="#">社交</a></li>
<li><a href="#">工具</a></li>
<li><a href="#">浏览</a></li>
<li></li>
</ul>
</div>
</div>
<!--end navbar -->
<br />
</body>
</html>
现在用dreamweaver编了一个网站的架构 然后想把之前编的javascript程序添加进去, 但是再打开网页的时候就不能运行那个javascript了。 单独的时候是可以运行的。 请大神们帮忙给看看 谢谢了 下面是我的代码
<!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">
<!-- DW6 -->
<head>
<!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>F-Droid</title>
<link rel="stylesheet" href="2col_leftNav.css" type="text/css" />
<style type="text/css">
<!--
.STYLE1 {font-size: xx-large}
-->
</style>
<SCRIPT>
var xmlDoc = new ActiveXObject("microsoft.xmldom")
xmlDoc.async=false
xmlDoc.load("fdroid.xml")
root=xmlDoc.documentElement
newHTML=""
function start(){
buildTree(root)
content.innerHTML=newHTML
}
function buildTree(passedNode){
var children = passedNode.childNodes.length
for (var j=0; j<children; j++){
Node=passedNode.childNodes.item(j)
if (Node.nodeName=="application"){ newHTML+=("<div class="story"><P>"+Node.nodeName+" "+j) }
if (!Node.hasChildNodes()){
if(Node.parentNode.nodeName == "name"){
newHTML+=( "<BR><B>"+Node.parentNode.nodeName+":</B> "+Node.text )}
else if (Node.parentNode.nodeName =="icon"){
newHTML+=("<BR><img src=\icons\" +Node.text +"></div>" )}
}
buildTree(Node)
}
}
window.onload = start;
</SCRIPT></head><BODY>
<!-- The structure of this file is exactly the same as 2col_rightNav.html;
the only difference between the two is the stylesheet they use --><div id="masthead">
<h1 id="siteName">F-Droid</h1>
</div>
<!-- end masthead -->
<div id="content">
<h2 id="pageName">HomePage</h2>
<div class="feature"> <img src="file:///C|/Users/lenovo/Documents/T-Droid/cropped-fdroidheader.jpg" alt="" width="331" height="112" />
<h3>F-droid</h3>
<p>. find the application you want!!! </p>
</div>
<div class="story"></div>
</div>
<!--end content -->
<div id="navBar">
<div id="search">
<form action="#">
<label>search</label>
<input name="searchFor" type="text" size="10" />
<input name="goButton" type="submit" value="go" />
</form>
</div>
<div id="sectionLinks">
<ul>
<li><a href="#" class="STYLE1">首页</a></li>
<li><span class="STYLE1"><a href="#">热门</a></span></li>
<li><span class="STYLE1"><a href="#">趋势</a></span></li>
</ul>
</div>
<div class="relatedLinks">
<h3>分类</h3>
<ul>
<li><a href="#">社交</a></li>
<li><a href="#">工具</a></li>
<li><a href="#">浏览</a></li>
<li></li>
</ul>
</div>
</div>
<!--end navbar -->
<br />
</body>
</html>
解决方案 »
- window.prompt() 在ie8 弹不出来
- 有谁知道 淘宝的数据魔方前台应用的什么技术!
- js var cannot be resolved
- 这个表单该怎么提交
- JS使用正则的小问题,请高人指点
- 动态生成table 的行的问题.
- 怎样用js来改变<A herf="" > 里herf的值?????????急急急急
- ★★★★★< 求图片上显示文字的代码 >★★★★★
- 急!!!!!!!在线等待!!!!!!!!!!11
- 怎样让JS弹出DIV,并把JS里的变量值传到这个DIV里
- Chrome和Safari不能够完全支持:onfocus="this.select();" ??
- 豌豆荚的一键安装可以像91一样集成到web网页内吗?
我一般都这样写
window.onload=function(){
//这里的代码在页面一载入就运行。你可以把start()在在这里面,等同于你的window.onload=start
start();
}
if (!Node.hasChildNodes()){
if(Node.parentNode.nodeName == "name"){
newHTML+=( "<BR><B>"+Node.parentNode.nodeName+":</B> "+Node.text )}
else if (Node.parentNode.nodeName =="icon"){
newHTML+=("<BR><img src='icons" +Node.text +"'></div>" )}引号嵌套问题