[PHP-users 5316] Re: urlの引数について

LastTom php-users@php.gr.jp
Sat, 09 Feb 2002 13:47:07 +0900


松川です。

> かなり基本的な部分なので、マンモス本でもシーラカンス本でもなんでも良いか
> らきちんと読んだほうが良いのでは?

  私はHTMLやJavaScriptあたりももう一度読み直して欲しいと思ってます。
以下、元文に対する返答。

> ----test.php---------------
> ...
> <form>
> <input type="text" name="hoge" value="">
> <input type="button" name="ok" value="OK" onClick="
> parent.f2.location.href='xxxx.php?hoge=<? echo $hoge ?>'">
> </form>
> ...

  このページで入力されたhogeをxxxx.phpに渡したい(表示したい)という事でしょ
うか? そうなら、

<form action="xxxx.php" target="f2" method="get">
<input type="text" name="hoge" value="">
<input type="submit" name="ok" value="OK" >
</form>

で、いいのでわ? htmlだけで済みますが...


Tsutomu Matsukawa