类似下面的html,提交给show.html, 完后显示出来,纯的html可以实现么
<form action="" method="post">
<div class="field">
This is a brief description of Interim Fix :
{# 自动生成的默认错误信息显示 #}
{# 会被翻译成:<ul class="errorlist"><li>这个字段是必填项。</li></ul> #}
{{ form.subject.errors }}
<label for="id_subject">12</label>
{{ form.subject }}
{# 自定义的错误信息显示 #}
{% if form.subject.errors%}
<label for="id_self_def_error_info" style="color: red;">
*自定义错误信息:主题不能为空
</label>
{% endif %}
</div>
<div class="field">
{{ form.email.errors }}
<label for="id_email"> for IBM SPSS Data Collection DDL 7 ("Software").</label>
{{ form.email }}
</div>
<div class="field">
{{ form.message.errors }}
<label for="id_message">页面中自定义的信息:</label>
{{ form.message }}
</div>
<input type="submit" value="提交">
</form>
</body>
</html>
表单post提交不行,html获取不到post提交的内容,改为get提交,然后自己分析location.search得到get提交的参数内容。
或者表单指定target="_blank"在新页面打开action。通过opener得到父页引用,然后通过父页控件得到值写入你的页面中后关闭父页(父页如果是直接打开的无法关闭。父页也是其他页面打开的可以关闭)
可以,你家里用的路由器的web界面不就是这么回事吗!
有2个东西必须写:
1,明白window.location数据格式,其实就是一个url,如xxxx.html?id=1%name=2
2,编写一个js函数,传入window.location变量,解出“xxxx.html?”后面的参数,这个js函数在body的onload函数里执行。
表单post提交不行,html获取不到post提交的内容,改为get提交,然后自己分析location.search得到get提交的参数内容。
或者表单指定target="_blank"在新页面打开action。通过opener得到父页引用,然后通过父页控件得到值写入你的页面中后关闭父页(父页如果是直接打开的无法关闭。父页也是其他页面打开的可以关闭)