Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/372.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何使用Iframe创建表格_Javascript_Php_Iframe_Responsive Design - Fatal编程技术网

Javascript 如何使用Iframe创建表格

Javascript 如何使用Iframe创建表格,javascript,php,iframe,responsive-design,Javascript,Php,Iframe,Responsive Design,我一直在阅读StackExchange上发布的一些Resposive网站。在我的本地主机上也尝试了一些代码,但没有一个适合我 项目:-我用php做了一个面向对象编程的酒店预订引擎,我做了一个表单,使用表结构,用户可以选择入住退房日期和其他细节 问题-我试图使表单具有响应性,但没有任何东西对我有效 目标:-使表单具有响应性,人们可以选择入住退房日期 PHP代码 IFRAME码 请帮助您需要学习响应式CSS的基础知识。这意味着媒体查询、%和em/rem值等 没有这个基本的基础,你就不能建造很多东西。

我一直在阅读StackExchange上发布的一些Resposive网站。在我的本地主机上也尝试了一些代码,但没有一个适合我

项目:-我用php做了一个面向对象编程的酒店预订引擎,我做了一个表单,使用表结构,用户可以选择入住退房日期和其他细节

问题-我试图使表单具有响应性,但没有任何东西对我有效

目标:-使表单具有响应性,人们可以选择入住退房日期

PHP代码

IFRAME码


请帮助

您需要学习响应式CSS的基础知识。这意味着媒体查询、%和em/rem值等

没有这个基本的基础,你就不能建造很多东西。
$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>&nbsp;<tb>'._CHECK_OUT.':'.$output2.'</td>&nbsp;<td>'.$output3.'</td>;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
            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>';
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";
    }

}