当前位置:编程学习 > C#/ASP.NET >>

请教高手。

  为什么就是改变不了当前的图片啊 。请高手解答(我想修改的是imageFrom控件)

 <script type="text/javascript">

       $.editable.addInputType('ajaxupload', {
           /* create input element */
           element: function (settings) {
               settings.onblur = 'ignore';
               var input = $('<input type="file" id="upload" name="upload" />');
               $(this).append(input);
               return (input);
           },
           content: function (string, settings, original) {
               /* do nothing */
           },
           plugin: function (settings, original) {
               var form = this;
               form.attr("enctype", "multipart/form-data");
               $("button:submit", form).bind('click', function () {

                   //$(".message").show();
                   $.ajaxFileUpload({
                       url: "subtitledit.ashx?subtitleid=" + subtitleid + "&&action=upload",
                       secureuri: false,
                       fileElementId: 'upload',
                       dataType: 'text/html',
                       success: function (data, status) {
                           if (status == "success") {
                               var person = $.parseJSON(data);
                               $(original).html(person.msg);
                               original.editing = false;

                             $("#imageFrom").src = "http://www.bcbbs.net/logo/2011bs.gif";


                          



                           }
                           else {
                               alert(data.msg + "Error");
                           }
                       },
                       error: function (data, status, e)
                       { alert(e); }
                   }); return (false);
               });
           }
       });
       
             
</script>
--------------------编程问答--------------------
imageFrom服务器控件还是<img id=imageFrom ??

另外,你可以把
$("#imageFrom").src = "http://www.bcbbs.net/logo/2011bs.gif";

事件处理器里面的第一行执行 --------------------编程问答--------------------  <asp:Image runat="server" ID="imageFrom" alt="" ImageUrl=""/> --------------------编程问答-------------------- 没有人帮忙解释下吗、
--------------------编程问答-------------------- $("#<%=imageFrom.ClientID%>").src --------------------编程问答-------------------- $("#<%=imageFrom.ClientID%>").src这个我也试过了,还是不行

没有更新到图片
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,