我可以通过模态或无模式对话来显示信息和联系表单吗? [英] What are my alternatives to modal or modeless dialogs to display information and contact forms?

查看:113
本文介绍了我可以通过模态或无模式对话来显示信息和联系表单吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个进行中的网站上有几个链接,它将显示我所称的一次性信息 - 有点像项目和联系表单等,我真的不想要使用户重新加载一个页面。



原本我以为我希望将这些显示为模式(或无模式)的窗口,从而阻止额外的页面加载并保留尽我所能在页面的一次载入中尽可能多地传递。



然而,我没有JS知识,所以我在试图实现一个模态窗口系统。问题1 - 有没有其他模式对话框更适合我没有想过? 我想唯一的其他选择是CSS弹出窗口在没有JS的情况下也会这样做。



我想我可能不得不辞去自己的页面加载,所以另一种情况是我有一个带音乐的边栏球员和其他数据。理想情况下,我不希望用户点击一个链接并重新加载音乐播放器(即,在用户导航到这个一次性信息时继续播放),1)由于用户停止和启动音乐的体验,以及2 ),所以多次重新开始不会影响播放次数。考虑到......



问题2 - 有什么我可以用相同的方式使用HTML框架设置用于非-dodgy,还是我必须接受玩家的重新加载? Modal pops是最好的做法。我不会建议去寻求任何其他联系方式的技巧。如果你不喜欢复杂性,那么有一个直接的技巧 HTML< form> 使用它。
简单 HTML表单的示例代码

 < div id ==errorresponse>< / div> 
< form name =myformaction =action.phpmethod =postonSubmit =validate()>
< input type =textname =firstname/>
< input type =textname =email/>
< input type =submitname =submitvalue =点击此处提交/>
< / form>


I have a couple of links on an in-progress website that will display what I am calling 'one-shot' information - stuff like a bit about the project and contact forms etc that I really don't want to have to make the user reload a page for.

Originally I thought that I would like to display these as modal (or mode-less) windows, thereby stopping extra page loads and keeping with my remit of trying to deliver as much as possible within one load of the page.

However, I have zero JS knowledge so I have failed miserably at trying to implement a modal window system. Question 1 - is there any alternatives to modal dialogs that would be better suited that I haven't thought about? I'm thinking the only other option is a CSS popup which would do the same without the JS.

I think I may have to resign myself to separate page loads, so the other situation is that I have a side bar with a music player and other data. I would ideally like to not have a user click a link and it reload the music player (ie it keeps playing as the user navigates to this one-shot information), 1) due to the user experience of stopping and starting music, and 2) so multiple re-starts doesn't affect the play count. That in mind...

Question 2 - is there anything I can use in the same way as a HTML frames setup used to that is non-dodgy, or would I have to just accept reloads of the player?

解决方案

Modal pops are the best practice. I won't advice to go for any other technique for contact forms. There is a straight forward technique HTML <form> use it if you don't like complexity. Sample code for a simple HTML form

<div id == "errorresponse"></div>
<form name = "myform" action = "action.php" method = "post" onSubmit = "validate()">
<input type = "text" name = "firstname"/>
<input type = "text" name = "email"/>
<input type = "submit" name = "submit" value = "Click Here to Submit"/>
</form>

这篇关于我可以通过模态或无模式对话来显示信息和联系表单吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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