如何访问JavaScript中传递的变量?

时间:2019-06-29 05:31:28

标签: javascript laravel laravel-5.2

0 =>           (对象)数组(              'settling_agent_id'=> 1              'settling_agent_code'=>'(aaaaa)',              'settling_agent_name'=>'ddddd',              '地址'=>'11111,1111',              'city_id'=>'1111',              'country_id'=> 60,              'area'=>'111',              '电话'=>'(90)1111',              '传真'=>'(90)11111         (90)212-293-1692',              '电子邮件'=>'1111',              '备注'=>'',              'settling_at_webster'=>'',              'print_include_city'=> 1,              'print_include_country'=> 1,              'active'=> 1,           ),

    @foreach ($settingList as $settingListL)
        var setList = {{$settingListL->country_id}};
        var setListn = {{$settingListL->settling_agent_id}};
        var setListna = {{ $settingListL->settling_agent_name }};
        if(countryId==setList){
          alert(setList);
          alert(setListn);
          alert(setListna);
        }
      @endforeach

0 个答案:

没有答案