1

我正在尝试让页面上的网络摄像头捕捉照片,我正在使用jquery web 插件。我在 Web 控制台中收到以下错误:[16:00:48.593] TypeError: $(...).webcam is not a function......

html:

    <head>

    <!-- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> --> 

    <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" />
    <script src="http://code.jquery.com/jquery-1.8.2.js"></script>
    <script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>

    <style>
        <%@ include file="../css/forms.css" %>
        <%@ include file="../css/citizen_registration.css" %>
        <%@ include file="../js/jQuery-webcam/jquery.webcam.js" %>

    </style>


    <script type="text/javascript">


    $(document).ready(function(){


        $("#camera").webcam({
                width: 320,
                height: 240,
                mode: "callback",
                swffile: "../js/jQuery-webcam/jscam_canvas_only.swf",    


                onLoad: function() {
                alert('HELLO');

                }


        }); 
 });


    <div id="camera"></div>
4

0 回答 0