我想在提交表单后打开一些感谢弹出窗口。我使用的是以下表单脚本:http://www.mattvarone.com/web-design/simpleform-php-email-script其已经具有响应,但将仅在线显示。
请帮忙!非常感谢您!
您是否尝试将javascript alert()
函数添加到表单的onsubmit
事件中?如果表单已经在调用一个函数,您可以随时在末尾添加一条alert语句。
在javascript checkform.js
中,您可能需要更改以下部分:
if ( passed == false )
{
// responce = alertText.replace('#name', eLabel); // Comment this out
alert( responce ); // Let just the response be there
next.focus();
return false;
}
或者我想说的最好的建议是使用jQuery或类似的东西来使用Modal Window插件:http://www.queness.com/post/77/simple-jquery-modal-window-tutorial
您可以将jquery插件用于弹出窗口,然后使用它包含的.popup()
函数。您可以从这里下载弹出插件