w623433018 发表于 2018-8-6 13:21

JS语言大佬求助

function openFindFaceGif(){
        $(".findFaceGif").show();
}
var requiredMajorVersion = 10;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
function openCamera(){
        // Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
        var hasProductInstall = DetectFlashVer(6, 0, 65);
        var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
        if ( hasProductInstall && !hasRequestedVersion ) {
                var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
                var MMredirectURL = window.location;
          document.title = document.title.slice(0, 47) + " - Flash Player Installation";
          var MMdoctitle = document.title;
                AC_FL_RunContent(
                        "src", "../../../onLineTakePhoto",
                        "FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
                        "width", "680",
                        "height", "420",
                        "align", "middle",
                        "id", "onLineTakePhoto",
                        "quality", "high",
                        "bgcolor", "#a6c9e2",
                        "name", "onLineTakePhoto",
                        "allowScriptAccess","sameDomain",
                        "type", "application/x-shockwave-flash" ,
                        "pluginspage", "http://www.adobe.com/go/getflashplayer"
                );
        } else if (hasRequestedVersion) {
                AC_FL_RunContent(
                                "src", "../../../onLineTakePhoto",
                                "width", "680",
                                "height", "420",
                                "align", "middle",
                                "id", "onLineTakePhoto",
                                "quality", "high",
                                "bgcolor", "#a6c9e2",
                                "name", "onLineTakePhoto",
                                "allowScriptAccess","sameDomain",
                                "type", "application/x-shockwave-flash",
                                "pluginspage", "http://www.adobe.com/go/getflashplayer"
                );
          } else {// flash is too old or we can't detect the plugin
          var alternateContent = 'Alternate HTML content should be placed here. '
                  + 'This content requires the Adobe Flash Player. '
                   + '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
          document.write(alternateContent);// insert non-flash content
          }
        // -->
}


function setValueToField(json){
        if(json!=null){
                var data = JSON.parse(json);
                if(data.status){
                        if(data.newPath != '' && data.newPath != null){
                                $("#cameraPicAdd").val(data.newPath);
                                $("#faceImg-view").html("<img alt='' id='cameraImg' src='"+data.newPath+"' style='width:250px;height:250px;'>");
                        }
                        $("#cameracontent").hide();
                        $(".findFaceGif").hide();
                        if(data.findFace){
                                parent.$.messager.show({title:'提示 ',msg:'识别成功!'});
                        }
                }else if(!data.findFace){
                        $(".findFaceGif").hide();
                        parent.$.messager.confirm('提示', '识别失败,请后重试', function(r){
                                if(!r){
                                        $("#cameracontent").hide();
                                }
                        });
                }
        }
}

小白
求大佬教怎么跳过失败或识别失败也成功 的教程
有写好的最好,可以自己对比那些不一样慢慢研究,感谢感谢
页: [1]
查看完整版本: JS语言大佬求助