如何通过URL传递值?

时间:2015-02-25 05:02:29

标签: jquery

我需要通过网址访问此内容:

   <script type="text/javascript">
  var inPlayPreferences = {"InplayPreferences":{"MarketOrder":[],"OpenedMarkets":[],"SportOrder":[],"FavoriteEvents":[],"OpenedUpcomingSports":[],"OpenedEvents":[3799712],"NavigationPanelViewMode":1,"IsUpcomingContainerOpened":false,"IsInPlayContainerClosed":false,"LastVisitedEventId":"3799712:1150","OpenedLiveNowSports":[1150,1154,1219],"IsTutorialEnabled":true,"IsPopularitySorted":true,"VisibleLiveNowSports":[],"VisibleUpcomingSports":[],"QuickBetStake":0,"CalendarLastVisitedInplaySport":"","CalendarLastVisitedUpcomingSport":"","ShowQuickBetMessage":true,"HighlightLastVisitedInplaySport":"","CurrentView":"single"},"AppPreferences":{"NoOfTopExpandedSport":3,"CheckEventCountToExpand":5,"CalendarEventCountLimit":10,"ExpandTopEvents":3,"EventNameTruncationLimit":30,"ParticipantTruncationLimit":20,"ComingUpHoursLimit":12,"EventUpdateRefreshRate":10,"LeftNavRefreshRate":16,"AllEventsRefreshRate":16,"CalendarLiveNowRefreshRate":12,"CalendarUpcomingRefreshRate":120,"FootballPitchEnabled":true,"FootballPitchRefreshRate":2,"TennisCourtEnabled":false,"TennisCourtRefreshRate":0,"CanDisplayTennisStatistics":false,"TennisScoreboardRedesignEnabled":false,"PriceUpdateRefreshRate":16,"PriceUpdateEnabled":false,"Col3CheckMarkets":6,"Col3OpenMarkets":2,"EventUpdateMode":1,"ClosedEventsDelay":300,"MarketContainerConfig":,"CloseQuickBetWindow":5,"QuickBetEnabled":true,"RightNavRefreshRate":60,"ScoreboardRefreshRate":5,"ScoreboardRefreshEnabled":false},"CurrentOddsFormat":"EU","IsDiffusionEnabled":false,"InPlayAppServiceName":"/services/InPlayApp.mvc/","InPlayCalendarServiceName":"/services/InPlayCalendar.mvc/"};
  var layoutController = null;

  jQuery(document).ready(function() {

  var root = jQuery.fastFindById('inplayApp');
  layoutController = new SB.inPlayApp.LayoutController(root);

  });
</script>

我正在尝试直接通过网址传输数据来制作一个paser:

  

http://pt.sportingbet.com/services/InPlayCalendar.mvc/GetUpcomingEvents?MarketOrder=&OpenedMarkets=&SportOrder=&FavoriteEvents=&OpenedUpcomingSports=&OpenedEvents=&NavigationPanelViewMode=1&IsUpcomingContainerOpened=false&IsInPlayContainerClosed=false&LastVisitedEventId=4013383:1150&OpenedLiveNowSports=1150,1154,1219&IsTutorialEnabled=true&IsPopularitySorted=true&VisibleLiveNowSports=&VisibleUpcomingSports=&QuickBetStake=0&CalendarLastVisitedInplaySport=&CalendarLastVisitedUpcomingSport=&ShowQuickBetMessage=true&HighlightLastVisitedInplaySport&CurrentView=single

但该网站给我一个错误! 我该如何通过URL传递这个javascript数据?

获得的错误:

  

500 - 内部应用程序错误抱歉,出现了错误   应用

     

你想做什么?

     

返回主页返回1步如果您要报告错误   您可以在这里联系我们的客户服务

1 个答案:

答案 0 :(得分:0)

这不是一个答案,只是一个长篇评论。

如果您无法向我们展示您的代码,请简化您的问题。创建一个测试页面,其中包含一个非常简单的测试$ _GET []字符串的版本:

http://pt.sportingbet.com/services/InPlayCalendar.mvc/GetUpcomingEvents?MarketOrder

在PHP文件中,只需解析get字符串并提醒变量值(或将其打印到屏幕)。

如果可行,则添加项目的另一个组件并使其正常工作。

这有点工作,但比等待我们其中一个人回答要快得多,特别是当我们看不到后端代码时。