语法帮助.... [英] Syntax Help....

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

问题描述

我疯了!


我需要一个格式为< input type =" hidden"的HTML行。 name =" shipping_1"

value =" 12.34">


其中" 12.34"代表一个变量。


介于< script>< / script>之间标签是什么格式和语法有一个好的HTML

发出包含在.htm?


帮助!


Ross

解决方案

文章< vh ************ @ corp.supernews .com>,Ross M. Greenberg"

< greenber-at-catskill.net>写道:

我疯了!

我需要一个格式为< input type =" hidden"的HTML行。 name =" shipping_1"
value =" 12.34">

其中" 12.34"表示变量。

在< script>< / script>之间标签是什么格式和语法有良好的
HTML
发布包含在.htm?

帮助!




您是否尝试动态设置其值?或者,当页面加载时,

创建输入?

document.formName.shipping_1.value = 12.34;


将设置其价值。

-

Randy

发布的所有代码均取决于查看浏览器

支持调用的方法,并且启用了Javascript。


我将表单命名为fred。这用于将信息传递给Paypal。


< form name =" fred"方法= QUOT;交" target =" paypal"

action =" https://www.paypal.com/cgi-bin/webscr">

< input type =" ;隐藏"名称= QUOT; shipping_1" value =" 12.34">

....

< input type =" submit"值= QUOT;支付"命名= [提交" onclick = clickit();>

< / form>

< script>

function clickit(){document.fred。 shipping_1.value = QUOT; 123.45英寸; }

< / script>

我认为这应该将shipping_1作为123.45提交给paypal,而是

提交原始值12.34。


帮助!


谢谢!


Ross


" HikksNotAtHome" <喜************ @ aol.com>在消息中写道

news:20 *************************** @ mb-m23.aol.com。 ..

在文章< vh ************ @ corp.supernews.com> ;,Ross M. Greenberg"
< greenber- at-catskill.net>写道:

我疯了!

我需要一个格式为< input type =" hidden"的HTML行。 name =" shipping_1"
value =" 12.34">

其中" 12.34"表示变量。

在< script>< / script>之间标签是什么格式和语法有良好的
HTML
发布包含在.htm?

帮助!



是你试图动态设置其值?或者,当页面加载时,
创建输入?

document.formName.shipping_1.value = 12.34;

将设置其值。 -
Randy
发布的所有代码都依赖于查看浏览器
支持所调用的方法,并且启用了Javascript。




您是否尝试过另一个事件处理程序 - onsubmit?


我认为js-function应该在表单之前。


Urs


Ross M. Greenberg写道:

我将表格命名为fred。这用于将信息传递给Paypal。

< form name =" fred"方法= QUOT;交" target =" paypal"
action =" https://www.paypal.com/cgi-bin/webscr">
< input type =" hidden"名称= QUOT; shipping_1" value =" 12.34">
...
< input type =" submit"值= QUOT;支付"命名= [提交" onclick = clickit();>
< / form>
< script>
函数clickit(){document.fred.shipping_1.value =" 123.45" ;; }
< / script>

我认为这应该将shipping_1作为123.45提交给paypal,而是提交原始值12.34
<帮助!

谢谢!

罗斯

" HikksNotAtHome" <喜************ @ aol.com>在消息中写道
新闻:20 *************************** @ mb-m23.aol.com ...

在文章< vh ************ @ corp.supernews.com> ;,Ross M. Greenberg"
< greenber- at-catskill.net>写道:

我疯了!

我需要一个格式为< input type =" hidden"的HTML行。 name =" shipping_1"
value =" 12.34">

其中" 12.34"表示变量。

在< script>< / script>之间标签是什么格式和语法有良好的
HTML
发布包含在.htm?

帮助!



是你试图动态设置其值?或者,当页面加载时,
创建输入?

document.formName.shipping_1.value = 12.34;

将设置其值。 -
Randy
所有发布的代码都依赖于查看浏览器
支持所调用的方法,并启用Javascript。




I''m going nuts!

I need an HTML line of the form <input type="hidden" name ="shipping_1"
value="12.34">

where "12.34" represents a variable.

Between <script></script> tags what is the format and syntax to have good HTML
emitted for inclusion in a .htm?

Help!

Ross

解决方案

In article <vh************@corp.supernews.com>, "Ross M. Greenberg"
<greenber-at-catskill.net> writes:

I''m going nuts!

I need an HTML line of the form <input type="hidden" name ="shipping_1"
value="12.34">

where "12.34" represents a variable.

Between <script></script> tags what is the format and syntax to have good
HTML
emitted for inclusion in a .htm?

Help!



Are you trying to dynamically set its value? Or, when the page is loaded,
create the input?

document.formName.shipping_1.value = 12.34;

will set its value.
--
Randy
All code posted is dependent upon the viewing browser
supporting the methods called, and Javascript being enabled.


I named the form "fred". This being used to pass info to Paypal.

<form name="fred" method="post" target="paypal"
action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" name="shipping_1" value="12.34">
....
<input type="submit" value="Pay" name="submit" onclick=clickit();>
</form>
<script>
function clickit(){document.fred.shipping_1.value="123.45"; }
</script>
This should, I think, submit shipping_1 as 123.45 to paypal, but is instead
submitting the original value of 12.34.

Help!

Thanks!

Ross

"HikksNotAtHome" <hi************@aol.com> wrote in message
news:20***************************@mb-m23.aol.com...

In article <vh************@corp.supernews.com>, "Ross M. Greenberg"
<greenber-at-catskill.net> writes:

I''m going nuts!

I need an HTML line of the form <input type="hidden" name ="shipping_1"
value="12.34">

where "12.34" represents a variable.

Between <script></script> tags what is the format and syntax to have good
HTML
emitted for inclusion in a .htm?

Help!



Are you trying to dynamically set its value? Or, when the page is loaded,
create the input?

document.formName.shipping_1.value = 12.34;

will set its value.
--
Randy
All code posted is dependent upon the viewing browser
supporting the methods called, and Javascript being enabled.




Did you try it with another event-handler - onsubmit?

And I think the js-function should be before the form.

Urs

Ross M. Greenberg wrote:

I named the form "fred". This being used to pass info to Paypal.

<form name="fred" method="post" target="paypal"
action="https://www.paypal.com/cgi-bin/webscr">
<input type="hidden" name="shipping_1" value="12.34">
...
<input type="submit" value="Pay" name="submit" onclick=clickit();>
</form>
<script>
function clickit(){document.fred.shipping_1.value="123.45"; }
</script>
This should, I think, submit shipping_1 as 123.45 to paypal, but is instead
submitting the original value of 12.34.

Help!

Thanks!

Ross

"HikksNotAtHome" <hi************@aol.com> wrote in message
news:20***************************@mb-m23.aol.com...

In article <vh************@corp.supernews.com>, "Ross M. Greenberg"
<greenber-at-catskill.net> writes:

I''m going nuts!

I need an HTML line of the form <input type="hidden" name ="shipping_1"
value="12.34">

where "12.34" represents a variable.

Between <script></script> tags what is the format and syntax to have good
HTML
emitted for inclusion in a .htm?

Help!



Are you trying to dynamically set its value? Or, when the page is loaded,
create the input?

document.formName.shipping_1.value = 12.34;

will set its value.
--
Randy
All code posted is dependent upon the viewing browser
supporting the methods called, and Javascript being enabled.





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

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