检索表单值 [英] Retrieving Form Value

查看:56
本文介绍了检索表单值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果有人能想到,我需要以下解决方案。 :)


我有:

1页面上的表格。 (没有名字,没有设置id值。)

3个隐藏的表单元素名称:catalog,vwoidc,oid


!!!我只能在body标签后面加上javascript。

表格位于加载页面的末尾附近。

< form action =" actionURL" method = post>

< input type = hidden name = catalog value = store>

< input type = hidden name = vwoidc value = 69a6e1deb02417250691>

<输入类型=隐藏名称= oid值= 60323>< / form>


我尝试的所有内容都需要在
页面已满载。


提前致谢!!

I need a solution for the following, if anyone can think of one. :)

I have:
1 form on the page. (no name, no id value set.)
3 hidden form elements named: catalog, vwoidc, oid

!!! I can only include the javascript right after the body tag. The
form is found near the end of the loaded page.
<form action="actionURL" method=post>
<input type=hidden name=catalog value=store>
<input type=hidden name=vwoidc value=69a6e1deb02417250691>
<input type=hidden name=oid value=60323></form>

Everything I''ve tried needs to have the javascript executed after the
page has been fully loaded.

Thanks in advance!!

推荐答案

Cognizance写道:
Cognizance wrote:
我需要一个以下的解决方案,如果有人能想到的话。 :)

我有:
页面上有1个表格。 (没有名字,没有设置id值。)
3个隐藏的表单元素命名为:catalog,vwoidc,oid

!!!我只能在body标签后面加上javascript。
表单位于加载页面的末尾附近。


< body>

< script type =" text / javascript" ;>

onload = function(){//用document.forms [0]做的东西}

< / script>


Mick

< form action =" actionURL" method = post>
< input type = hidden name = catalog value = store>
< input type = hidden name = vwoidc value = 69a6e1deb02417250691>
< input type = hidden name = oid值= 60323>< / form>

我已经尝试过的所有内容都需要在
页面完全加载后执行javascript。

在此先感谢!!
I need a solution for the following, if anyone can think of one. :)

I have:
1 form on the page. (no name, no id value set.)
3 hidden form elements named: catalog, vwoidc, oid

!!! I can only include the javascript right after the body tag. The
form is found near the end of the loaded page.

<body>
<script type="text/javascript">
onload=function(){ //do stuff with document.forms[0] }
</script>

Mick

<form action="actionURL" method=post>
<input type=hidden name=catalog value=store>
<input type=hidden name=vwoidc value=69a6e1deb02417250691>
<input type=hidden name=oid value=60323></form>

Everything I''ve tried needs to have the javascript executed after the
page has been fully loaded.

Thanks in advance!!



Cognizance写道:
Cognizance wrote:

我尝试的所有东西都需要有javascript在
页面完全加载后执行。

Everything I''ve tried needs to have the javascript executed after the
page has been fully loaded.




当然是。

JS无法读取或写入 - 在一些尚未附加的东西


-

Stephane Moriaux et son [moins] vieux Mac



yes of course.
JS can''t read or write-in thomething that doesn''t yet append

--
Stephane Moriaux et son [moins] vieux Mac


ASM写道:
Cognizance写道:
Cognizance wrote:
>


我有的一切试过需要h在
页面完全加载后执行javascript。
Everything I''ve tried needs to have the javascript executed after the
page has been fully loaded.



当然是。


yes of course.




否,当然不是JS不需要完全加载页面,它需要你试图访问渲染/加载的




创建一个有80,000行的测试页。在顶部,就在

正文之后,添加一个脚本块,其中包含一个与之前的代码相关的警报,你会惊讶于它确实会读取它

页面加载之前。


-

Randy

comp.lang.javascript常见问题 - http://jibbering.com/faq &新闻组周刊



No, not of course. JS doesnt need the page fully loaded, it needs what
you are trying to access rendered/loaded.

Create a test page that has 80,000 lines. At the top, right after the
body, add a script block with an alert that does something with the
previous code and you will be surprised that it will indeed read it
before the page has loaded.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly


这篇关于检索表单值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆