0
在「保存」模式下使用jquery camera時,它似乎沒有效果。我試圖手動調用「webcam.save」中的url,它工作正常。看來,jQuery相機無法正常工作。有沒有人有任何想法?保存模式下的jquery攝像機不保存文件
<!DOCTYPE html>
<html>
<head>
<title>Registration</title>
<script type="text/javascript" src="http://localhost/ra/js/jquery.js"></script>
<script type="text/javascript" src="http://localhost/ra/js/jquery.webcam/jquery.webcam.js"></script>
</head>
<body>
<h1>Register</h1>
<h4>Picture</h4>
<div id="picture"></div>
<input type="button" id="take_picture" value="Take Picture" />
</body>
</html>
<script type="text/javascript">
$("#picture").webcam({
width: 320,
height: 240,
mode: "save",
swffile: "http://localhost/ra/js/jquery.webcam/jscam.swf",
onTick: function() {},
onSave: function() {},
onCapture: function() {},
debug: function() {},
onLoad: function() {}
});
$("#take_picture").click(function()
{
webcam.save("http://localhost/ra/index.php/registration/do_upload_picture");
});
</script>
嘗試刪除您的回調定義(onTick,onSave等),因爲您沒有使用它們,並定義調試方法輸出到控制檯並查看是否提供了任何有用的消息。 – bwest
試過,調試沒有提供任何保存。 –