想使用window.open()将电子邮件地址作为附加到网址的参数传递,但是我挂断了。这就是返回的内容
http://app.gogodriver.com/SignupPage.php?email= [对象%20HTMLInputElement]
功能:
function open_app(tryitemail)
{
window.open("http://app.gogodriver.com/SignupPage.php?email="+tryitemail, "_blank","width=450, height=650");
}
HTML:
<form id="tryitfree">
<input class="input" type="text" name="tryitemail" placeholder="Email" size="25" />
<input type="image" src="images/go-button.png" id="TryItButton" value="email" onClick="open_app(tryitemail)">
</form>
答案 0 :(得分:0)
这是因为您要发送输入元素,而不是它的值。你应该这样做:
<input type="image" src="images/go-button.png" id="TryItButton" value="email" onClick="open_app(tryitemail.value)">