如何在“哑”页面上获得动态(部分在选择时出现)表单? WAP 电话(无 Javascript)?
我的网站页面的目标是从相当复杂(但简洁)的表单中获取信息。易用性对我来说非常重要,因此当我在 WAP 模拟器上测试表单时,我很失望地发现,当我单击在普通浏览器(包括 iPhone 的浏览器)上成功显示表单正确部分的单选按钮时,没有任何反应。我意识到这是因为页面中的代码是 javascript,而大多数愚蠢的 WAP 手机不支持它。当我实现 javascript 时,单选按钮下方的表单选项在被选择之前不会显示,我知道您在想什么 - “只需弹出默认表单选项” - 但我无法弄清楚如何在不破坏整个出现/消失行为的情况下做到这一点。
我想我可以询问浏览器是否支持javascript,如果支持,则将其重定向到启用javascript的页面,或者如果不支持,则重定向到没有动态内容的页面...我希望有一个更好的选择,但我该怎么做?非常感谢!
my site page's goal is to get information from a fairly complex (but concise) form. Ease of use is a big deal for me so when I tested the form on a WAP emulator, I was disappointed to see nothing happen when I clicked on radio buttons that successfully display the correct portion of the form on normal browsers, including the iPhone's. I've realized that this is because the code in the page is javascript and most dumb WAP phones don't support it. When I implement javascript, it's so that form options below a radio button don't show up until they are selected, and I know what you're thinking - "just make default forms options pop up" - but I couldn't figure out how to do that without ruining the whole appearing/disappearing act.
I suppose I could ask the browser if it supports javascript and redirect it to the javascript-enabled page if it does, or one without dynamic stuff if it doesn't... I wish there was a better option but how would I do that? BIG thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用
you could either use <noscript> to display the whole form on "dumb phones" or you could make some "config wizard"-like thing, like showing the radiobuttons on one page, submit it, and then (using php/ASP/whatever) send only the fields that depend on the previously checked options.