a.asp<BODY>
<FORM METHOD=POST ACTION="" name="frm1"><IFRAME name="smallpic" marginWidth="0" marginHeight="0" src="frm_b.html?id=xxx" frameBorder="0" height="510" scrolling="no"></IFRAME>
<INPUT TYPE="hidden" NAME="aa"></FORM>
</BODY>
b
function show(temp)
{
top.frm1.aa.value = temp;
alert(top.frm1.aa.value)}

解决方案 »

  1.   

    忘说了是要在a.asp中用document.write打出
      

  2.   

    也就是b.asp中两张图片还在,但是要在a.asp中把这个隐藏文本的值打出或打出变量,如果b.asp中那个show函数中用了document.write(top.frm1.aa.value);的话图就没了,所以要在a.asp中打出,请大家帮忙
      

  3.   

    //aa.htm
    <script>
    a = 1;
    function aa(value)
    {
        document.write(value);
    }
    </script>
    <iframe src="bb.htm"></iframe>//bb.htm
    <script>
    top.aa(123)
    </script>
    这样虽然实现了在aa中打印,但问题是把aa.htm冲掉了,所以只要你用document.write都会有这样的问题
    解决办法是在要打印的那个页面中加入<div>
    现在我将你的b.asp修改以在b中打印:
    加入div
    function show(temp)
    {
    window.parent.frm1.aa.value = temp;
    window.parent.temp_Str = temp;
    document.getElementById("showaa").innerText = temp;
    }
    <div id=showaa></div>
    <img border='0' src='xxx' onclick=javascript:show('111')></img>
    <img border='0' src='xxx' onclick=javascript:show('222')></img>
    <img border='0' src='xxx' onclick=javascript:show('333')></img>