如果用过uploadify上传插件的达人可能更知道我干什么反正就是上传图片 并生成缩略图 但是传入的宽度高度总是初始值看代码吧 我都注释了
<script type="text/javascript" src="/e/extend/talent/upload/jquery.min.js"></script>
<script type="text/javascript" src="/e/extend/talent/upload/jquery.uploadify-3.1.js"></script>
<link rel="stylesheet" type="text/css" href="/e/extend/talent/upload/uploadify.css">
<script>
$(function() {
var imgwidth=$("#width").val(); //定义变量 获取宽度
var imgheight=$("#height").val();   //定义变量 获取高度

//宽高都有初始值,当用户改变值时重新赋值变量
$("#width").change( function() {
imgwidth=$("#width").val();
alert(imgwidth); //这里alert出来的这个变量的值是对的,的确是改变后的
});  $("#file_upload_1").uploadify({
method   : 'post',
//下面传参数,经测试传进去的还是宽高两个input的初始值而非用户改变后的
formData      : {'type' : 1, 'classid' : <?=$classid?>, 'filepass' : <?=$filepass?> , 'doing' : 1, 'field' : 'titlepic', 'getsmall' : 1, 'width' : imgwidth, 'height' : imgheight},
height        : 30,
swf           : '/e/extend/talent/upload/uploadify.swf',
uploader      : '/e/extend/talent/upload/up.php',
width         : 120,
onUploadSuccess : function(file, data, response) {
alert(imgwidth); //走到这里alert出来的值也是改变后的,但上面传进去的说什么都是初始的
            alert(data);
$("#picurl").val(data);
        }
});
});
</script>
<input type="file" name="file_upload" id="file_upload_1" />
宽度 <input name="width" type="text" id="width" value="105" size="6">
高度 <input name="height" type="text" id="height" value="118" size="6">