d:\workspace\rails\things\public\javascripts\prototype.js中的\换成/

解决方案 »

  1.   

    哈哈
    这个src一看就不顺眼
      

  2.   

    还不明白?d:\\workspace\\rails\\things\\public\\javascripts\\prototype.js最好写相对地址
      

  3.   

    Anewczs(Anew) 说的对。最好用相对路径。
    比如 test.html需要使用prototype.js,如果test.html和prototype.js在同一文件夹下,你可以这样用 :
    <script language="javascript" src="prototype.js"></script>
    如果不在同一文件夹下,都要相对于test.html的路径来写。
    <script language="javascript" src="js/prototype.js"></script>
    js文件夹和test.html同以目录
      

  4.   

    这个不是主要问题我说的是 ie 的 element.insertAdjacentHtml方法为什么老出错报告: 操作的原始 HTML 无效
    或者报告 未知错误
    我的是IE6
      

  5.   

    <script src="http://localhost:3000/javascripts/prototype.js?1169646436" type="text/javascript"></script>
    <body>
    <textarea id="area"></textarea>
    <script>
    document.getElementById("area").insertAdjacentHTML("beforeBegin","<div>ssssssssss</div>");
    new Insertion.Top("area","<div>ssssssssss</div>");
    </script>
    </body>似乎是prototype.js的问题,因该以上两语句是等效的。但是后者却出错了。
      

  6.   

    Prototype Insertion, IE 6, tr’s, and “invalid target element for this operation…”After much hardship I’m giving up on trying to use Prototype’s Insertion function for inserting new rows after a specified target row. Everything I try works in Firefox but blows out in IE 6, which is the “supported platform”. After some searching it seems IE has inconsistent support for the insertAdjacentHTML method, and apparently for elements like TR and TBODY IE will throw an exception if the method is called on those methods. In the latest prerelease there is a fix for tbodys, but nothing for tr, and my knowledge of dom manipulation fell short when trying to hack that in. If anyone can see how to add that to prototype.js, please let me know. This seems like something that would be commonly done with Rails apps for dynamically adding rows to a table, so its curious that I couldn’t find anything via Google… 
    google到了一篇文章