如何在较小尺寸的屏幕中间以单独的 html 形式获取 php 文件的输出
How to get output of a php file in separate html form at the middle of screen of lesser size
如何在较小尺寸的屏幕中间以单独的html形式获取php文件的输出。请参阅以下部分。它不起作用。帮助
<html>
<head>
<script type="text/javascript">
//This function auto-fills fields the form 'qform' and auto submits.
function datcal(subnm, chpno, qsnno)
{
document.qform.subnm1.value = subnm;
document.qform.chpno1.value = chpno;
document.qform.qnumber1.value = qsnno;
document.getElementById("qform").submit();
}
//calling the function with some data
datcal('chem11','1','2');
</script>
</head>
<body>
<form>
<!-- This is the other part of form here.....-->
</form>
<!-- I want to get the out put of below form at center of screen separately -->
<form id = "qform" name="qform" action="getques.php" style="visibility:hidden"
method="post" target="_blank">
<input type="text" name="subnm1" ><br>
<input type="text" name="chpno1" ><br>
<input type="text" name="qnumber1" ><br>
<input type="submit">
</form>
</body>
</html>
上面的代码正在打开一个新窗口,但我希望该窗口的大小不是全屏而是更小。怎么做?
如果我理解你的问题,最简单的方法是打开创建一个将所有这些参数作为查询字符串的页面。然后,您可以通过将其设置为超链接来在窗口中打开新页面。新页面还可以通过从查询字符串中获取所有这些参数来处理您的输入。
<script language ="javascript">
function submitForm(){
var url = "http://www.newpage.php?subnm1="+value1+"chpno1="+value2 //and like this
window.open (url, "acb", "status=no, width=960, height=700")
}
</script>
<a href="#" onclick="submitForm()">Submit</a>
相关文章:
- 从单独的html文件预览Javascript文本
- 如何将要单独填充的每个HTML画布路径/形状分开
- 这个html代码可以自动提交吗(如果有单独的页面需要在提交后出现)
- 在一个html模板中使用(点击)事件来控制单独模板Angular 2中的[hidden]元素
- Javascript+HTML中的日期选择器准备好了吗?(需要:DD、MM、YY的单独字段加上日历选择器)
- 通过单独的js文件设置HTML值
- JavaScript:使用来自单独HTML文档的输入写入当前HTML文档
- HTML可读的单独脚本标记
- 如何在较小尺寸的屏幕中间以单独的 html 形式获取 php 文件的输出
- 将 PHP 联系表单加载到位于单独 HTML 页面上的 Iframe 中
- 根据单独选择的选项显示 HTML 选项
- 如何使用javascript或html将数据传递到单独的程序
- 拥有多个 HTML 页面通常使用的单独 javascript 文件是否会加快页面加载速度
- 从单独的 html 页面创建一个 dom 元素
- HTML和JavaScript在单独的文件中 - 新手警报
- 将 html 内容分解为单独的更高级别 html 标记并将它们存储在数组中
- 使用 jQuery 在 HTML 表中显示单独的 XML 元素
- 页面加载在页面中 -->转发到索引.html当页面单独加载时
- 两列网页,菜单使用 Jquery 加载单独的 HTML 文件
- 获取单独的 html 标记中的值