如何让nude.js在我的asp.net Web表单中工作?

时间:2015-01-27 15:38:13

标签: javascript asp.net nude.js

我不确定我对外部.js文件的调用是否正确。另外,我创建一个按钮还是一个asp:Button?

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">


<title>NSFW Content Detection</title>



<link rel="icon" type="image/png" href="/images/nsfwcircle.jpg" />
<style type="text/css">
 #t1 {
height: 405px; }
</style>

</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="SM1" runat="server" EnablePageMethods="true">
<Scripts>
<asp:ScriptReference Path="~/js/nude.min.js" />
<asp:ScriptReference Path="~/js/noworker.nude.min.js" />
<asp:ScriptReference Path="~/js/worker.nude.min.js" />
<asp:ScriptReference Path="~/js/test.nude.js" />

</Scripts>
</asp:ScriptManager>


<div id="wrapper">
<h1>Demo pictures</h1>
<div class="entry" id="t1">
<img id="testImage" src="/images/1.jpg" width="500" height="375" alt="" />
<button style="width: 88px" title="Scan Image" class="btn" id="btnCall" onclick="nude.load(document.getElementById('testImage'));nude.scan(function(result){ if(!result) document.getElementById('result1').innerHTML='No nude!!'; });">Scan Image</button>
<div style="float:right;margin-top:-20px;" id="result1"> </div>
</div>
</div>  
</form>
</body>
</html>

我想只是扫描图像并返回图像下方图像是裸照还是非图像的值。

0 个答案:

没有答案