解决ckfinder 在IE10下无法使用popup方法进行文件上传
如题的解决方法:
在head标签前面加上这句:
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
国外牛人的解决方法:http://ckeditor.com/forums/Support/IE10-ckfinder-popup-unable-upload
1 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="example1.aspx.cs" Inherits="CKControlExample.example1" %> 2 3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4 5 <html xmlns="http://www.w3.org/1999/xhtml"> 6 <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" /> 7 <head runat="server"> 8 9 <title></title><script src="ckfinder/ckfinder.js" type="text/javascript"></script><%-- 10 <script src="ckfinder/ckfinder_v1.js" type="text/javascript"></script>--%> 11 12 <%-- <script type="text/javascript"> 13 var finder = new CKFinder(); 14 finder.BasePath = '/ckfinder/'; 15 //finder.SelectFunction = ShowFileInfo; 16 finder.Create(); 17 </script>--%> 18 <script type="text/javascript"> 19 20 function BrowseServer() { 21 // You can use the "CKFinder" class to render CKFinder in a page: 22 var finder = new CKFinder(); 23 //finder.resourceType = "Flash"; 24 //finder.startupPath = "Files:/"; 25 finder.basePath = '/ckfinder/'; 26 finder.selectActionFunction = SetFileField; 27 finder.popup(); 28 29 // It can also be done in a single line, calling the "static" 30 // popup( basePath, width, height, selectFunction ) function: 31 // CKFinder.popup( '../', null, null, SetFileField ) ; 32 // 33 // The "popup" function can also accept an object as the only argument. 34 // CKFinder.popup( { basePath : '../', selectActionFunction : SetFileField } ) ; 35 } 36 37 // This is a sample function which is called when a file is selected in CKFinder. 38 function SetFileField(fileUrl) { 39 document.getElementById('Text1').value = fileUrl; 40 } 41 42 </script> 43 </head> 44 <body> 45 <form id="form1" runat="server"> 46 <div> 47 视频:<input id="Text1" type="text" /><input id="Button1" type="button" value="浏览服务器" onclick="BrowseServer();" /> 48 49 </div> 50 </form> 51 </body> 52 </html>