onchange第二次点击失效的解决办法

$("#Qrcode").on("change",function(){
		replace();
	});
	function replace()
	{
		$.ajaxFileUpload({
			url:"__CONTROLLER__/QrcodeSet",
			secureuri:false,  
        	fileElementId:'Qrcode',//file标签的id  
       		dataType: 'json',//返回数据的类型  
       		cache:false,
       		success: function(data)
       		{
       			$(".qcode img").attr("src","__UPLOADS__/admin/qrcode/"+data.msg).attr("data",data.msg);
       		 	$("#Qrcode").replaceWith(''); 
           		 $("#Qrcode").on("change",function(){
         			replace();
         		});
       		},
       		error(xml,c,e)
       		{
       			alert(e);
       		}
		});
	}

你可能感兴趣的:(html)