Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/414.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 传递给getElementByID()的空字符串_Javascript_Html_Jquery_Getelementbyid - Fatal编程技术网

Javascript 传递给getElementByID()的空字符串

Javascript 传递给getElementByID()的空字符串,javascript,html,jquery,getelementbyid,Javascript,Html,Jquery,Getelementbyid,我试图使用脚本通过单击单选按钮打开pdf文件,但我的控制台显示传递给getElementByID()的空字符串错误。但是,脚本获取了要显示的正确文件和代码,但它没有显示在屏幕上。我还附上了我的浏览器的截图。请告诉我原因是什么 <label><a href="javascript:void(0)" class="view_ta" data-ta-id="" > <input class="input-text" type="radio" style="width: 3

我试图使用脚本通过单击单选按钮打开pdf文件,但我的控制台显示传递给getElementByID()的空字符串错误。但是,脚本获取了要显示的正确文件和代码,但它没有显示在屏幕上。我还附上了我的浏览器的截图。请告诉我原因是什么

<label><a href="javascript:void(0)" class="view_ta" data-ta-id="" >
<input class="input-text" type="radio" style="width: 30px;" value="iagree" name="agreement"></a><span style="display: block; float: right; margin-top: 3px;">Я согласен с<!--I Agree With--></span></label>

    <script>
        $(document).ready(function(){

        $('.view_ta').click(function(){
            var jq = $(this);
            var ta_id = jq.attr('data-ta-id');
            var agrmnt_type = '';
            if(ta_id == ''){
                agrmnt_type == "RUNI";

            }
            $('.mod-agr-app').find('.modal-content').html('')
            $.post('/call_ajax.php',{holder:'show_agr',agrmnt_type:agrmnt_type,ta_id:ta_id},function(res){ 
                console.log(res);
                $('.mod-agr-app').find('.modal-content').html(res);
                $('.mod-agr-app').modal('show');
            });
        })

    });
    </script>[Please have a look the screenshot][1]

$(文档).ready(函数(){
$('.view_ta')。单击(函数(){
var jq=$(本);
var ta_id=jq.attr('data-ta-id');
变量agrmnt_type='';
如果(ta_id==''){
agrmnt_类型==“RUNI”;
}
$('.mod agr app').find('.modal content').html('')
$.post('/call_ajax.php',{holder:'show_agr',agrmnt_type:agrmnt_type,ta_id:ta_id},函数(res){
控制台日志(res);
$('.mod agr app').find('.modal content').html(res);
$('.mod agr app').modal('show');
});
})
});
[请看截图][1]