能不能不用 post 我是用了 iframe(大小為0)調用aa.php

解决方案 »

  1.   

    iframe(大小為0)也可以提交。不用提交,不用aa.php?xxxx,你想做什么啊?可以用xmlhttp,也是提交啊
      

  2.   

    post怎么用呀,为什么??提交时候加个target
      

  3.   

    to net_lover:
    我在parent中提交到iframe中的src=aa.php 可以嗎,form 中的 action怎麼寫?
    我要通過 iframe 來改變 parent 中的一些值.
      

  4.   

    是这个意思吗?
    <form action="" method=post target=subwin>
    <input type=submit>
    </form>
    <iframe name=subwin></iframe>
      

  5.   

    to xuzuning(唠叨)
    你的方法會另開一窗口,我不要那樣。
      

  6.   

    会吗?只要有target指向就不会有新窗口的。
      

  7.   

    test_listbox.php<form name=selectform action="" method="post" target="iframe1">
    <select id="select1" width=40 size=6 style="width:120">
    <option value=1>a1
    <option value=2>a2
    <option value=3>a3
    <option value=4>a4
    <option value=5>a5
    <option value=6>a6
    <option value=7>a7
    <option value=8>a8
    </select><select id="select2" name="select2" width=40 size=6 style="width:120">
    <option value=1>b1
    <option value=2>b2
    <option value=3>b3
    <option value=4>b4
    <option value=5>b5
    <option value=6>b6
    <option value=7>b7
    <option value=8>b8
    </select><select id="select3" name="select3" width=40 size=6 style="width:120">
    <option value=1>c1
    <option value=2>c2
    <option value=3>c3
    <option value=4>c4
    <option value=5>c5
    <option value=6>c6
    <option value=7>c7
    <option value=8>c8
    </select>
    <input type="submit" value="test" >
    <iframe src="test_listbox_a.php" name="iframe1" width=300 height=100></iframe>
    </form>
    test_listbox_a.php<?echo "here<br>";?>要怎麼才能在 test_listbox_a.php 中輸出 test_listbox.php 中 select的各項???
      

  8.   

    test_listbox.php<form name=selectform action="test_listbox_a.php" method="post" target="iframe1">
    <select id="select1" name="select1" width=40 size=6 style="width:120">
    <option value=1>a1
    <option value=2>a2
    <option value=3>a3
    <option value=4>a4
    <option value=5>a5
    <option value=6>a6
    <option value=7>a7
    <option value=8>a8
    </select><select id="select2" name="select2" width=40 size=6 style="width:120">
    <option value=1>b1
    <option value=2>b2
    <option value=3>b3
    <option value=4>b4
    <option value=5>b5
    <option value=6>b6
    <option value=7>b7
    <option value=8>b8
    </select><select id="select3" name="select3" width=40 size=6 style="width:120">
    <option value=1>c1
    <option value=2>c2
    <option value=3>c3
    <option value=4>c4
    <option value=5>c5
    <option value=6>c6
    <option value=7>c7
    <option value=8>c8
    </select>
    <input type="submit" value="test" >
    <iframe src="" name="iframe1" width=300 height=100></iframe>
    </form>test_listbox_a.php<?
    print_r($_POST);
    ?>
      

  9.   

    to xuzuning(唠叨) :怎麼為:
    Array ( ) 
      

  10.   

    提交后表单的有效变量都保存在数组$_POST中
    你若需要取得第二个select的值用
    $_POST['select2']
    嫌麻烦就先 extract($_POST);
    就可以直接用 $select2 了。