我有一個用SpringMVC 應用和我使用春天標籤,但是我一直在尋找在應用中拍照與攝像頭,我發現JQuery webcam plugin的解決方案。Spring MVC和HTML 5
問題是這是使用元素/標籤和Spring Taglib沒有這個標籤的定義。我怎麼能過來呢?我需要使用標籤,如彈簧標籤,或者是否有彈簧標籤替代品。下的一個例子,說明我的代碼功能:
代碼
<script type="text/javascript">
$(document).ready(function(){
$("#canvas").hide();
$("#camera").webcam({
width: 320,
height: 240,
useMicrophone: false,
mode: "callback",
swffile: "resources/swf/jscam_canvas_only.swf",
quality:85,
onSave: saveCB,
onCapture: function() {
$("#camera").hide();
webcam.save();
$("#canvas").show();
},
debug: function (type, string) {
$("#status").html(type + ": " + string);
}
});
$('#upload').click(function() {
webcam.capture();
return false;
});
window.addEventListener("load", function() {
var canvas = document.getElementById("canvas");
if (canvas.getContext) {
ctx = document.getElementById("canvas").getContext("2d");
ctx.clearRect(0, 0, 320, 240);
image = ctx.getImageData(0, 0, 320, 240);
}
}, false);
});
<label id="status"></label>
<div id="camera"></div>
<div><p><canvas id="canvas" height="240" width="320"></canvas></p></div>
<input id="upload" type="button" value="Take Photo">
<input id="retake" type="button" value="Re-Take Photo">
<ol>
<li>
<label>Select Gender</label>
<form:select path="genderId" id="genderId" title="Select Your Gender">
<form:options items = "${gender.genderList}" itemValue="genderId" itemLabel="genderDesc" />
</form:select>
<form:errors path="genderId" class="errors"/>
</li>
<li><form:label for="weight" path="weight">Enter Weight <i>(lbs)</i></form:label>
<form:input path="weight" id="weight" title="Enter Weight"/><form:errors path="weight" class="errors"/>
</li>
你想在春天想要哪個元素/標籤? – insomiac
是標籤 – devdar