php通过第1页的链接发送参数,并在第2页启动javascript

php通过第1页的链接发送参数,并在第2页启动javascript,php,javascript,Php,Javascript,在第1页,我尝试通过url将一些参数传递到第2页。 我想启动第2页并选择选项,就像我在第2页上选择它们一样 如何从第1页传递DivOptionTake、divSelectChannel\u btnsupmit、selected\u channel\u new、selChannels、frmSelectChannel并执行它?谢谢 第1页 ..…/page2.php?选择的频道=facebook和选项 第2页 表格的代码在这里 您需要使用$\u GET全局变量检索url的值;如何执行此操作的示例:

在第1页,我尝试通过url将一些参数传递到第2页。 我想启动第2页并选择选项,就像我在第2页上选择它们一样

如何从第1页传递DivOptionTake、divSelectChannel\u btnsupmit、selected\u channel\u new、selChannels、frmSelectChannel并执行它?谢谢

第1页

..…/page2.php?选择的频道=facebook和选项

第2页

表格的代码在这里


您需要使用$\u GET全局变量检索url的值;如何执行此操作的示例:


所以你想用第1页的选择来操纵第2页吗?是的。还想了解如何从第1页传递参数。第2I页是指第1页的形式;我很抱歉没有具体说明。我实际上没有。但这只是GET的一个正常形式
<html>

  <script type="text/javascript">        
    $(document).ready(function() {

        <?php if($option_to_take == ""){ ?>
        $.blockUI({ message: $('#divOptionToTake'), css: { width: '420px' } }); 
        <?php } ?>

        // SELECT CHANNEL
        $('#divSelectChannel_btnSubmit').click(function() {                
            $.unblockUI();
            $('#selected_channel_new').val($('#selChannels').val())
            $('#frmSelectChannel').submit();
            //return true;               
        });            

    });  
  </script>

</html>
<form name="frmSelectChannel" id="frmSelectChannel" action="" method="POST">
<input type="hidden" name="task" value="select_channel" />
<input type="hidden" name="option_to_take" value="new campaign" />
<input type="hidden" name="selected_channel" id="selected_channel_new" value="facebook" />
<div id='divSelectChannel'>
        <select id='selChannels' class='span3'>
                        <option value="facebook" <?php echo (($selected_channel == "facebook") ? "selected='selected'" : ""); ?>>facebook</option>
                        <option value="twitter" <?php echo (($selected_channel == "twitter") ? "selected='selected'" : ""); ?>>twitter</option>                                                         
        </select>
            <input class='btn btn-primary' type='submit' id='divSelectChannel_btnSubmit' value='Submit' />
        &nbsp;&nbsp;
              <input class='btn' type='button' id='divSelectChannel_btnBack' value='Back' />
        </div>
   </form>