0
我一直在阅读一些关于StackExchange的Resposive网站。在我的本地主机上也尝试了一些代码,但其中没有一个为我工作。如何制作Iframe响应表
项目: - 我做了一个酒店预订引擎与面向对象编程在PHP我做了一个表格使用表结构,其中用户可以选择签入签出日期和其他细节。
问题 - 我试图使窗体resposive但没有什么工作对我来说
目的: - 为了使形式响应,人们可以选择在检查离店日期
PHP代码
$output .='<table cellspacing="2" border="0" style="width: 100%; border-collapse: collapse;">';
if(!empty($output_hotels)){
$output .= '<tr><td><label>'._SELECT_HOTEL.':</label></td></tr>
<tr><td nowrap="nowrap">'.$output_hotels.'</td></tr>';
$output .= '<tr><td><label>'._SELECT_LOCATION.':</label></td></tr>
<tr><td nowrap="nowrap">'.$output_locations.'</td></tr>';
}
$output .= '<tr><td>'._CHECK_IN.': '.$output1.'</td> <tb>'._CHECK_OUT.':'.$output2.'</td> <td>'.$output3.'</td>; ';
if(!empty($output_hotels)){
$output .= '<tr><td style="height:5px"></td></tr>
<tr><td nowrap="nowrap">'.$output_sort_by.'</td></tr>';
}
$output .= '<input class="button" type="button" onclick="document.getElementById(\'reservation-form\').submit()" value="'._CHECK_AVAILABILITY.'" /></table>';
IFRAME代码
if(hsJsHost != ''){
var hsJsKey = (typeof hsJsKey === 'undefined') ? '' : hsJsKey;
var hsJsHost = (typeof hsJsHost === 'undefined') ? '' : hsJsHost;
if(hsJsKey != '' && hsJsHost != ''){
var encoded_host = encode64(hsJsHost);
var encoded_key = encode64(hsJsKey);
var filePath = 'widgets/ipanel-left/index.php?host='+encoded_host+'&key='+encoded_key;
// setup the iframe target
var iframe='<iframe id="frame" name="widget" src="#" width="15px" height="200px" marginheight="0" marginwidth="0" frameborder="no" scrolling="no"></iframe>';
// write the iframe to the page
document.write(iframe);
var myIframe = parent.document.getElementById("frame");
// setup the width and height
myIframe.height = 100;
myIframe.width = 815;
myIframe.src = hsJsHost+filePath;
// set the style of the iframe
myIframe.style.border = "1px solid #aaa";
myIframe.style.padding = "8px";
myIframe.style.margin-right = "10px";
}
}
请帮忙