动态加入?楼主再描述清楚一点.
屏蔽右键菜单很容易的
<body oncontextmenu="return false"...
但想要别人不获取你的源代码理论上是不可能.

解决方案 »

  1.   

    比仿说:a.htm是动态生成的。现在里面没有引入a.js,我想动态在生成a.htm后引入a.js.
      

  2.   

    var the = document.createElement("<SCRIPT>")
    document.body.appendChild( the )
    the.src = "a.js"
      

  3.   

    你以前想在哪里写<script src=xxx,就在哪里动态地加在哪里
      

  4.   

    我要的是动态效果。比如说:a.htm现在没有<script src=a.js>我现在想通过在b.htm中用javascript将<script src=a.js>动态加入到a.htm.不是我手工往a.htm里写入是自动写入。
      

  5.   

    a和b是什么关系?iframe还是open?
      

  6.   

    是在一个页面下table中的两个td中的iframe
    当我点左边b.htm时,将在右边iframe中打开a.htm也有可能是别页面。我要动态把<script src=a.js>这样一段脚本加进去。
      

  7.   

    <iframe id=aa name=aa></iframe>
    <iframe id=bb name=bb src=b.htm></iframe>-----------b.htm-----------
    <script>
    function test()
    {
        var theWin = parent.window.frames[ "aa" ];
        var the = theWin.document.createElement("<SCRIPT>")
        theWin.document.body.appendChild( the )
        the.src = "a.js"
    }
    </script>