document.all.pic.src="d:\images\frame0.jpg";

解决方案 »

  1.   

    对了,你本地的地址应该是file://d:/...<html>
    <head>
    <img name="pic" >
    </head><body>
    <script language="JavaScript">
     document.all.pic.src="http://51js.1000box.net/images/logo.gif";</script>
    </body></html>
      

  2.   

    同 意 emu(ston) 
    不要放在head 里面你的用法正确。
    如果要用document.all ,那请用 id=xxx
    同时注意,netscape 下面不能直接用 document.all.xxx
    而应该是w3c标准:
    var Img = document.getElementById("xxx");
    if(typeof("Img")!="undefined") Img.src="...";
      

  3.   

    document.pic.src="d:\\images\\frame0.jpg";
      

  4.   

    <html>
    <head>
    <title>"hello"</title>
    <bgsound  src=pathstr loop="-1">
    </head>
    <body>
    <script language="JavaScript">   var pathstr="mid/10.mid";
       
     </script></body></html>那这个正确写法是什么?有没有关于这方面的书籍,本人以前没有接触过
    这方面的工作,现在移民加拿大,为了找工作,不得不去学这个。
    但是学习氛围肯定没有在中国那么好。现在主要有几个方面的问题:
       关于参数传递的问题,如何从一个页面的参数传到另外一个页面  举例说明:
                比如说在index.htm的页面有这样的一段代码
         <a herf="message.htm? boardid=3">
          那么如何在message.htm 中引用bordid 这个参数
          为了调试我在MESSAGE。HTM中舔加了这么一行的代码
          DOCUMENT。WRITE(BOARDID);
         结果是出错了。     还有如何动态的选择参数。
         在按上面的例子来说吧。     <a herf="message.htm ? boarid=GetID()'>
        那么这个正确的该怎么写,其中GETID 是用JAVASCRIPT 写的函数    还有在用DOCUMENT.write 对想写时候,一些特别的符号该怎么表达
        比如 ""   < , >    现在我申请了一个免费的个人主页,那要对数据库操作时该怎么办,
    是不是只能简单的使用文件式的数据库。
      

  5.   

    首先,恭喜你成功移民!""   < , >  在document.write 时可以直接写或
    document.write('""   < , >'); ==
    document.write('&quote;&quote   &lt; , &gt;'); ==
    相关资料可以查w3c 的文档。关于html 参数传递的解答:
    <a herf="message.htm?boardid=3">
    那你在 message.htm 里面:
    <script language=javascript>
    aa=window.location.search.split("&")[0].split("=");
    if(aa.length>0) alert(aa[1]);
    </script>
    如果动态改变boardid 的值呢那你就在index 里面:
    <a herf="message.htm?boardid=3" id=myhref>
    <script>
    var myhref = document.getElementById("myhref");
    if(myhref!=null){
        myhref.href="message.htm?boardid="+GetID();
    }
    </script>
    最后,你上面的例子应该改成:<html>
    <head>
    <title>"hello"</title>
    </head>
    <body>
    <!--注释:所有用户定义的html元素应该放在body 里. -->
    <bgsound id=abc src="" loop="-1">
    <script language="JavaScript">
       var _abc = document.getElementById("abc");
       if(_abc!=null){
           _abc.src="mid/10.mid";
       }else alert("abc is not exist");   
     </script></body></html>