简体   繁体   English

使用javascript创建上载btn并在上载文件后的代码中进行处理

[英]Creation of an upload btn with javascript and Handeling in code behind the uploaded file

http://code.google.com/p/upload-at-click/ http://code.google.com/p/upload-at-click/

am trying to create an upload btn in img style, i found this site, my quetion is the in the example the code is : 我试图创建一个img样式的btn上传文件,我找到了这个网站,我的问题是示例中的代码是:

var uploader = document.getElementById('Imgbox1'); var uploader = document.getElementById('Imgbox1'); upclick({ element: uploader, action: '/path_to/you_server_script.php',** onstart: function (filename) { alert('Start upload: ' + filename); }, oncomplete: function (response_data) { alert(response_data); } }); upclick({{element:uploader,action:'/path_to/you_server_script.php',** onstart:function(filename){alert('Start upload:'+ filename);},oncomplete:function(response_data){alert(response_data );}});

i am working in .net, the example gice the action the path of .php file ,if i want to point do i point to the ascx or what , to be able to upload the file ? 我在.net中工作,示例将.php文件的路径作为动作,如果我想指出,我要指向ascx还是什么,以便能够上传文件? or to a code that be done on the server side but how is that 或在服务器端完成的代码,但是那是怎么回事

You are using .NET on the server-side, in the same way that PHP is, this is completely irrelevant as your question is related to Javascript. 您正在服务器端使用.NET ,就像使用PHP一样,这完全不相关,因为您的问题与Javascript有关。

If you're asking how to handle the uploaded files, you would generally look into Request.Files 如果您询问如何处理上传的文件,通常会查看Request.Files

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM