Javascript Laravel中未显示弹出按钮

Javascript Laravel中未显示弹出按钮,javascript,laravel,popup,Javascript,Laravel,Popup,我目前正在尝试制作一个弹出式表单,出于某种原因,我的表单只会返回空白。我目前正在跟踪 当我去查看查看页面源代码时,所有代码仍然存在,但刀片中没有显示任何内容。它只是一片空白。应该有弹出按钮显示 这是我的刀: evaltest.blade.php <html> <head> <title>Popup contact form </title> <meta name="robots" content="

我目前正在尝试制作一个弹出式表单,出于某种原因,我的表单只会返回空白。我目前正在跟踪

当我去查看查看页面源代码时,所有代码仍然存在,但刀片中没有显示任何内容。它只是一片空白。应该有弹出按钮显示

这是我的刀:

evaltest.blade.php

 <html>
    <head> 
        <title>Popup contact form </title>
        <meta name="robots" content="noindex, nofollow">    
        <link href="{{ asset('css/elements.css') }}" rel="stylesheet">
        <script src="js/my_js.js"></script> 
        <script type="text/javascript">
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-43981329-1']);
        _gaq.push(['_trackPageview']);
        (function () {
        var ga = document.createElement('script');
        ga.type = 'text/javascript';
        ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0];
        s.parentNode.insertBefore(ga, s);
        })();
    </script>
    </head> 
     <!-- body starts here -->
     <body id ="bdy" style="overflow:hidden;">

     <div id="abc">

         <!-- Popup div starts here -->
     <div id="popupContact"> 

        <!-- contact us form -->
             <form class="form-horizontal" method="post" action="{{ url('/evaltest/'.$data->id) }}">
            {{ csrf_field() }}
             <input type="hidden" name="user_id" value="{{$data->id}}">

         <div class="form-group">
            <label class="col-md-2"><b>Recommendation:</b></label>
          <div class="col-md-6">
            <input type="radio" id ="recommendation" name="recommendation" value="Yes"> Yes<br>
            <input type="radio" id ="recommendation" name="recommendation" value="No"> No<br>
          </div>

                          <div class="form-group">
            <label class="col-md-2"><b>Training Schedule:</b></label>
          <div class="col-md-6">
            <input type="radio" id = "training_schedule" name="training_schedule" value="Yes"> Yes<br>
            <input type="radio" id = "training_schedule" name="training_schedule" value="No"> No<br>
            <input type="radio" id = "training_schedule" name="training_schedule" value="NIL"> NIL<br>
          </div>

                                <div class="form-group">
            <label class="col-md-2"><b>Training Date (key in date if yes or pending, else just say nil and leave the date):</b></label>
          <div class="col-md-6">
            <input type="date" id = "training_date" name="training_date" class="form-control">
            <input type="text" id = "training_date" name="training_date" class="form-control">
          </div>        
                <a id="submit" href="javascript: check_empty()">Send</a>
            </form>
     </div> 
    <!-- Popup Div Ends Here -->
    </div>
    <!-- Display Popup Button -->
    <h1>Click Button To Popup Form Using Javascript</h1>
    <button id="popup" onclick="div_show()">Popup</button>
    </body>
    <!-- Body Ends Here -->
    </html>
以下是路线:(如果需要)


对于JavaScript和CSS,我只是从网站上复制和粘贴,所以不会有任何区别。但是对于JavaScript,我只用我的id替换了它们的id,而其余的id保持不变

首先更正js包含代码

<script src="{{ asset('/js/my_js.js) }}"></script> 


如果你在网页的页脚区域包含js代码就好了。

我已经将css和js都存储在了我的公用文件夹中,那么它不应该工作吗?或者我真的要将权限设置为777才能工作吗?浏览器开发人员控制台是否显示任何错误?@Vishal wait有一个错误,上面写着:加载资源失败:服务器以404(未找到)状态响应div_show()中的内容js函数?但我确实为javascript正确地设置了路径,如我的evaltest.blade.php所示。我把js保存在公用文件夹中
Route::get('/user/showupdate8/{id}/evaltest', 'evalController@getEval1');
Route::post('/evaltest/{id}', 'evalController@eval');
<script src="{{ asset('/js/my_js.js) }}"></script>