我如何获得此输入ID值的此值(此值是从其他输入值通过ID加载的)

发布于 2025-02-02 07:00:36 字数 408 浏览 1 评论 0原文

这是形式 输入级之间的值是从myid中从另一个使用javascript create.element创建的输入的名称*值。

我的Q是,如何获得值 name 并进入

                <form method="POST" action="name.php">

                    <input type="hidden" name="myname" id="myid" value="000" >name</input>

                    <input type="submit" name="submit" >
                </form>

名称

THIS IS THE FORM
the value between the input tage is the name* value that coms from the myid from another input that was created with javascript create.element.

my qs is that how can i get the value name and into the name.php

                <form method="POST" action="name.php">

                    <input type="hidden" name="myname" id="myid" value="000" >name</input>

                    <input type="submit" name="submit" >
                </form>

the php only get the value 000

thank you for the help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ˇ宁静的妩媚 2025-02-09 07:00:36

名称不会发送到name.php,只有value in &lt; input&gt;可以发送到操作URL.O因此,如果要获取name,则可以添加另一个&lt; input&gt;喜欢:

<input type="hidden" name="myname" id="myid" value="000">
<input type="text" name="whatever" value="name" readonly>

如果要使它可编辑,只需删除readonlyly

name won't be sent to name.php, only value in <input> can be sent to the action url.So if you want get name, you can add another <input> like:

<input type="hidden" name="myname" id="myid" value="000">
<input type="text" name="whatever" value="name" readonly>

And if you want make it editable, just remove the readonly.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文