上传图片并将其设置为背景

上传图片并将其设置为背景

问题描述:

嘿,

我希望我网站上的用户能够通过

hey,

i want my users on my website to be able to change the bodys background image via

Background:


在CSS中.

到目前为止,我有:


in css.

so far i have:

<input type="file" id="file_upload" name="file_upload" />
   <a href="java<!-- no -->script:$('#file_upload').uploadifyUpload();">Upload File</a>


和jQuery


and the jQuery

$(document).ready(function() {
         $('#file_upload').uploadify({
      'uploader'    : '/uploadify/uploadify.swf',
      'script'      : '/uploadify/uploadify.php',
      'cancelImg'   : '/uploadify/cancel.png',
      'folder'      : '/uploads',
	  'sizeLimit'   : 204800,
	  'onComplete'  : function(event, ID, fileObj, response, data) {
      alert('There are ' + data.fileCount + ' files remaining in the queue.');
    }
    });
    });



我想用一个字符串替换警报",这可以做到这一点...
关于下一步的任何想法吗?

p.s
我的服务器支持PHP



i want to replace the ''alert'' with a string which could do this...
any ideas on what to do next?

p.s
My server supports PHP

('#file_upload').uploadifyUpload();" < /a >
('#file_upload').uploadifyUpload();">Upload File</a>


和jQuery


and the jQuery


(文档).ready(
(document).ready(function() {


(#file_upload' ).uploadify({ ' 上传器':' /uploadify/uploadify.swf'' 脚本':' /uploadify/uploadify.php'' cancelImg':' /uploadify/cancel.png'' 文件夹':' /上传"' sizeLimit': 204800 ' onComplete':函数(事件, ID,fileObj,响应,数据){ alert(' 有' + data.fileCount + ' 队列中剩余的文件.'); } }); });
('#file_upload').uploadify({ 'uploader' : '/uploadify/uploadify.swf', 'script' : '/uploadify/uploadify.php', 'cancelImg' : '/uploadify/cancel.png', 'folder' : '/uploads', 'sizeLimit' : 204800, 'onComplete' : function(event, ID, fileObj, response, data) { alert('There are ' + data.fileCount + ' files remaining in the queue.'); } }); });



我想用一个字符串替换警报",这可以做到这一点...
关于下一步的任何想法吗?

p.s
我的服务器支持PHP



i want to replace the ''alert'' with a string which could do this...
any ideas on what to do next?

p.s
My server supports PHP