链接提交想法 [英] Link Submit Ideas

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

问题描述




我需要在javascript提交中传递一些信息。


< a href =" javascript :document.formName.submit();"> Subm it Form< / a>


通常链接会执行page.jsp?x1 = 1& x2 = 2& x3 = 3,你可以拉x1,x2,

x3。我不知道怎么做这个链接提交。


谢谢,

云母

PS。请不要对链接提交有任何评论,按钮将无法正常工作,因为它需要多维模糊和动态。

Hi,

I need to pass some info in a javascript submit.

<a href="javascript:document.formName.submit();">Subm it Form</a>

Normally a link would do page.jsp?x1=1&x2=2&x3=3 and you would pull x1, x2,
x3. I have no clue how to do this with a link submit.

Thanks,
Mica
PS. Please no comments about the link submit, a button will not work as it
needs to be multi-dim''d and dynamic.

推荐答案

Mica Cooper在6/29/2006 9:55 PM发表以下内容:
Mica Cooper said the following on 6/29/2006 9:55 PM:


我需要在javascript提交中传递一些信息。


不,你只是认为你这样做。

< a href =" javascript :document.formName.submit( );"> Subm it Form< / a>


< input type =" submit" value =" Submit Form">

通常一个链接会做page.jsp?x1 = 1& x2 = 2& x3 = 3你会拉x1,x2,
x3 。我不知道如何通过链接提交来做到这一点。


不确定为什么你认为你需要一个链接提交,只需提交表格。

PS。请不要对提交的链接发表任何评论,按钮将不起作用,因为它需要多维度和动态。
Hi,

I need to pass some info in a javascript submit.
No, you just think you do.
<a href="javascript:document.formName.submit();">Subm it Form</a>
<input type="submit" value="Submit Form">
Normally a link would do page.jsp?x1=1&x2=2&x3=3 and you would pull x1, x2,
x3. I have no clue how to do this with a link submit.
Not sure why you think you need a "link submit", just submit the form.
PS. Please no comments about the link submit, a button will not work as it
needs to be multi-dim''d and dynamic.




是什么让你认为链接是更有活力的比按钮?它不是。


是什么让你觉得按钮不是多暗的?它是。


这是Usenet。你发表了一个想法,它得到了评论。不要它

评论,不要发布。


-

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

暂时在: http:// members.aol.com/_ht_a/hikksnotathome/cljfaq/

Javascript最佳实践 -



What makes you think that a link is "more dynamic" than a button? It isn''t.

What makes you think that a button isn''t "multi-dim''d"? It is.

This is Usenet. You post a thought, it gets commented on. Don''t want it
commented on, don''t post it.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Randy Webb写道:
Randy Webb wrote:
Mica Cooper在6/29/2006 9:55 PM发表以下内容:
Mica Cooper said the following on 6/29/2006 9:55 PM:


我需要在javascript提交中传递一些信息。
Hi,

I need to pass some info in a javascript submit.

<不,你只是认为你这样做。



No, you just think you do.

< a href =" javascript :document.formName.submit() ;"> Subm it Form< / a>
<a href="javascript:document.formName.submit();">Subm it Form</a>



< input type =" submit" value =" Submit Form"



<input type="submit" value="Submit Form">

通常一个链接会做page.jsp?x1 = 1& x2 = 2& x3 = 3你会拉
x1 ,x2,x3。我不知道如何通过链接提交来做到这一点。
Normally a link would do page.jsp?x1=1&x2=2&x3=3 and you would pull
x1, x2, x3. I have no clue how to do this with a link submit.



不确定为什么你认为你需要一个链接提交,只需提交表格。



Not sure why you think you need a "link submit", just submit the form.

PS。请不要对提交的链接发表评论,按钮将不起作用
因为它需要多维度和动态。
PS. Please no comments about the link submit, a button will not work
as it needs to be multi-dim''d and dynamic.



是什么让你觉得链接是更有活力的比按钮?它
不是。
是什么让你认为一个按钮不是多暗的?它是。

这是Usenet。你发表了一个想法,它得到了评论。不想要它评论,不要发布。



What makes you think that a link is "more dynamic" than a button? It
isn''t.
What makes you think that a button isn''t "multi-dim''d"? It is.

This is Usenet. You post a thought, it gets commented on. Don''t want
it commented on, don''t post it.




兰迪忘记告诉你的是,你的提交链接将<只要表单''formName''

将其method属性设置为''get'',br />
就会自动完成您想要的操作。 x1,x2& x3将发送。


但是!你应该删掉那个'javascript :''伪协议。

如果你的客户关闭了JS怎么办?将其更改为以下内容:

< a href =" NeedJsInfo.html"的onclick = QUOT; document.formName.submit();返回

false;">

提交表格

< / a>


-

Dag。



What Randy forgot to tell you, is that your submit link will
automatically do exactly what you want as long as the form ''formName''
have its method attribute set to ''get''. x1, x2 & x3 will be sendt.

BUT! You should drop that abnomination ''javascript:'' pseudo-protocol.
What if your clients have JS turned off? Change it to something like this:
<a href="NeedJsInfo.html" onclick="document.formName.submit(); return
false;">
Submit Form
</a>

--
Dag.


Mica Cooper写道:
Mica Cooper wrote:
我需要传递一些信息javascript提交。

< a href =" javascript :document.formName.submit();"> Subm it Form< / a>

通常一个链接可以做page.jsp?x1 = 1& x2 = 2& x3 = 3你会拉x1,x2,
x3。我不知道如何通过提交链接来做到这一点。

谢谢,
Mica
PS。请不要对提交的链接发表任何评论,按钮将无法正常工作,因为它需要多维度和动态。
I need to pass some info in a javascript submit.

<a href="javascript:document.formName.submit();">Subm it Form</a>

Normally a link would do page.jsp?x1=1&x2=2&x3=3 and you would pull x1, x2,
x3. I have no clue how to do this with a link submit.

Thanks,
Mica
PS. Please no comments about the link submit, a button will not work as it
needs to be multi-dim''d and dynamic.




我想你''正在寻找隐藏的表单字段,请尝试:


< form method =" get"行动= QUOT; HTTP://www.google.com/" name =" formName">

< input type =" hidden"名称= QUOT; X1" value =" 1">

< input type =" hidden"名称= QUOT; X 2" value =" 2">

< input type =" hidden"名称= QUOT×3 QUOT; value =" 3">

< / form>

< a href =" javascript :document.formName.submit ();"> Subm it Form< / a>


-

Bart



I think you''re looking for hidden form fields, try:

<form method="get" action="http://www.google.com/" name="formName">
<input type="hidden" name="x1" value="1">
<input type="hidden" name="x2" value="2">
<input type="hidden" name="x3" value="3">
</form>
<a href="javascript:document.formName.submit();">Subm it Form</a>

--
Bart


这篇关于链接提交想法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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