HTML4 中没有按钮的 POSTDATA?
我在 html 页面中有图表。这些图表是通过调用 IMG 标记中的 cgi-bin 程序生成的: 目前,图表的数据作为 GET 参数(在 URL 本身中)传递。
一切正常,但 GET 参数太长。我想通过 POSTDATA 传递数据。我拥有的所有书籍(以及我在网上找到的讨论)都谈到在包含“提交”按钮的表单中使用 POSTDATA。我只想让图表显示为页面的一部分,而不需要提交。这可以做到吗?可以用 HTML4 完成吗,还是需要 javascript?
I have graphs in an html page. The graphs are generated by a call to a cgi-bin program in an IMG tag:
<IMG src="http://myserver.com/cgi-bin/StatBarChart.cgi?data=1,2,&data=3,5,1&legend=EC,ER">
Currently, the data for the graphs is passed as GET args (in the URL itself.)
Everything’s working OK, but te GET arguments are too long. I want to pass the data via POSTDATA. All the books I have (and discussions on the web that I’ve found) talk about using POSTDATA in forms that include a Submit button. I just want the graphs to appear as part of the page, without a Submit. Can this be done? Can it be done in HTML4, or does it require javascript?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我需要 javascript,因为您必须自己获取资源并将其设置为 img 标签。这在 html4 中是不可能的。
另外,我没有看到长网址的问题。您的用户永远不会看到它(除非他查看源代码,我不再认为源代码是简单的“用户”),所以这也没有问题。
I would require javascript, as you would have to get the resource yourself and set it to the img tag. This is not possible in html4.
Also, I don't see the problem with a long url. Your user will never see it (unless he looks in the sourcecode, which I don't consider as simple "user" anymore) so there is no problem with that either.