一个窗口应该打开一个buttom和pass值,请你检查一下 [英] a window should open with a buttom and pass value, would you please check it

查看:68
本文介绍了一个窗口应该打开一个buttom和pass值,请你检查一下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 <   html  >  
< head >
< title > 订购单< / title >
< script >
function myWindow(){
window .open( SubWindow.html second,HEIGHT = 200 ,WIDTH = 100

}
< / script >
< ; / head >
< body bgcolor = #FFFFCC >

Turnshop Corp.
订购单


< 表单 名称 = orderform 方法 = get action = >
< 输入 类型 = text name = 总计 = $ 0 size = 7 < span class =c ode-keyword>>
< 输入 类型 = 按钮 value = 转到发票 onclick < span class =code-keyword> = myWindow() / >

< / form >
< / body >
< / html >



第二页:

 <   html  >  
< head >
< title > ; 确认< / title >
< / head >
< body >
< 形式 >
您的申请已确认!
您的付款是:
< 输入 type = text onChange = < span class =code-keyword> opener.document.orderform.Total.value = this.value
/ >
< /表格 >

< / body >
< / html >

决方案

0 size = 7 >
< 输入 type = button value = 转到发票 onclick = myWindow() / >

< / form >
< / body >
< / html >



第二页:

 <   html  >  
< head >
< ; title > 确认< / title >
< ; / head >
< <跨度class =code-leadattribute> body >
< 表格 >
您的申请已确认!
您的付款是:
< 输入 type = text onChange = < span class =code-keyword> opener.document.orderform.Total.value = this.value / >
< /表格 >

< / body >
< / html >


嗯。

如果你将其中一个按钮事件挂钩到函数中,你认为它可能有点帮助吗?魔术不会发生这些事情...



W3Schools :OnClick事件 [ ^ ]

OriginalGriff是对的:



替换

< input type =buttonvalue =转到发票/>

by

< input type =buttonvalue =转到发票onclick =myWindow()/>

<html>
<head>
<title>Order Form</title>
<script>
function myWindow() {
	    window.open("SubWindow.html","second",HEIGHT= 200,WIDTH= 100)

	    }
</script>
</head>
<body bgcolor="#FFFFCC">

  Turnshop Corp.
  Order Form


<form name="orderform" method="get" action="" >
<input type="text" name="Total" value="$0" size="7">
<input type="button" value="Go To Invoice" onclick="myWindow()"/>

</form>
</body>
</html>


second page:

<html>
<head>
    <title>Confirmation</title>
</head>
<body >
    <form >
        Your Request Has Confirmed !
        Your Payment Is:
<input type="text" onChange="opener.document.orderform.Total.value=this.value" />
    </form>

</body>
</html>

解决方案

0" size="7"> <input type="button" value="Go To Invoice" onclick="myWindow()"/> </form> </body> </html>


second page:

<html>
<head>
    <title>Confirmation</title>
</head>
<body >
    <form >
        Your Request Has Confirmed !
        Your Payment Is:
<input type="text" onChange="opener.document.orderform.Total.value=this.value" />
    </form>

</body>
</html>


Um.
You don't think it might help a little if you hooked one of the button events up to the function? These things don't happen by magic...

W3Schools: OnClick event[^]


OriginalGriff is right:

Replace
<input type="button" value="Go To Invoice" />
by
<input type="button" value="Go To Invoice" onclick="myWindow()"/>


这篇关于一个窗口应该打开一个buttom和pass值,请你检查一下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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