Do not talk nonsense; directly add the Code:
You know:
, Import Js.
<script type="text/javascript" src="${pageContext.request.contextPath}/cmsui/javascript/jquery.js"></script><script type="text/javascript" src="${pageContext.request.contextPath}/cmsui/ui/jquery.form.js"></script>
<Form ID = "imgfilesupload" Action = "file_imgfileupload.action" method = "Post" enctype = "multipart/form-Data" isclick = "0"> <input type = "file" Name = "file" datatype = "require" MSG = "select a video album art image"/> <button id = "imgssubmit" type = "button" class = "button"> upload </button> </form>
$ ("# Imgssubmit "). click (function () {imgsupload_video () ;}); function imgsupload_video () {var TF = validator. validate ($ ("# imgfilesupload") [0], 2); If (TF! = True) {return ;}$ (this ). ATTR ("disabled", "disabled"); $ ("# imgfilesupload "). ajaxsubmit ({success: function (result) {var num = result. replace (/<[^>] +>/g, ""); var MSG = "successful! "; Var isclick =" 1 "; if (num =" 0 ") {MSG =" failed! "; Isclick =" 0 ";} else if (num ="-1 ") {MSG =" incorrect image format! "; Isclick =" 0 ";} top. dialog. alerts ("prompt", MSG, function () {$ ("# imgurl "). val (Num); $ ("# videoimg "). ATTR ("src", num); $ ("# imgfilesupload "). ATTR ("isclick", isclick );});}});}