0
我期待從彈出的消息提交的數據,並通過郵件傳遞給一個URL,然後將用戶重定向到一個新的URL。javascript問題重定向和張貼提示數據到url
如果fname和電子郵件是他們我想發佈fname和電子郵件到一個URL。
我怎樣才能做到這一點?
<script type="text/javascript">
$(document).ready(function() {
$.msgbox("<p><b>Grocery Coupons Newsletter</b></p><p>Save $$$ With Coupons and Samples in your E-Mail</p>", {
type : "prompt",
inputs : [
{type: "text", label: "Insert your First Name:", value: "", required: true},
{type: "text", label: "Insert your Email:", required: true}
],
buttons : [
{type: "submit", value: "OK"},
{type: "cancel", value: "Exit"}
]
}, function(fname, email) {
if (fname) {
window.location = "http://www.google.com/";
}
});
});
</script>