<script type="text/javascript">
function submitWindow() {
..
// URL, name and attributes
window.open('http://isivmwebtest.isolutionsinc.com/ComparativePricing/Content/PriceLookup.aspx','windowNew','width=300, height=300');
return true;
}
</script>
<div class="form-outer">
<div class="resource-form">
<h3>FREE National Price-Look Up Tool</h3>
<h4>Powered by ComparativeHospitalData.com</h4>
<form action="http://isivmwebtest.isolutionsinc.com/ComparativePricing/Gateway.aspx" method="post" onsubmit="return submitWindow()">
<input type="hidden" name="RemoteAction" value="PriceLookup" />
<strong>Enter HCPCS Code(s)</strong><br />
<input onfocus="this.value=''" type="text" name="codes" value="XXXXX or XXXXX,XXXXX or XXXXX-XXXXX" /><br /><br />
<strong>Enter HCPCS Description</strong><br />
<input onfocus="this.value=''" type="text" name="desc" value="partial name okay" /><br /><br />
<input type="submit" value="Search" />
</form>
<span style="font-size:0.8em;font-style:italic;padding-top:10px;">*Search will lead you away from this site.</span>
</div>
</div>
我希望此表单在一个很小的弹出窗口中显示结果。我已经厌倦了许多方法,但都没有成功。现在,我正在使用一些Javascript使其正常工作,但它似乎仍然无能为力。有什么帮助吗?
最佳答案
除了width和height之外,还可以在specs参数中传递其他参数。看这里。 http://www.w3schools.com/jsref/met_win_open.asp
您可以删除标题栏,状态栏等以使其更小。
尝试:
window.open('http://isivmwebtest.isolutionsinc.com/ComparativePricing/Content/PriceLookup.aspx','windowNew','width=300,height=300,location=no,menubar=no,status=no,toolbar=no');
关于javascript - 打开表单会在新的调整大小的窗口中显示,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9506739/