Commit d13b2c96 by 冷斌

踢人

parent 68207d14
......@@ -10,7 +10,7 @@
var input = '<input type="file" id="ipt-file1" name="image" style="display:none" accept="image/*" />';
$('#upload').html(input);
var iptt=document.getElementById(index);
if(window.addEventListener){
if(window.addEventListener){
iptt.addEventListener('change',function(){
ajaxFileUpload(index);
$(".shadd[data-select="+index+"]").show();
......@@ -20,7 +20,7 @@
{
iptt.attachEvent('onchange',function()
{
ajaxFileUpload(index);
ajaxFileUpload(index);
$(".shadd[data-select="+index+"]").show();
});
}
......@@ -42,7 +42,7 @@
var str=JSON.parse(data);
if(str.ret==200)
{
$("#thumb").val(str.data.url);
$("#img_file1").attr("src",str.data.url);
$(".shadd[data-select="+img+"]").hide();
......@@ -53,9 +53,9 @@
layer.msg(str.msg);
}
},
error: function(data)
error: function(data)
{
layer.msg("上传失败");
$(".shadd[data-select="+img+"]").hide();
......@@ -77,7 +77,7 @@
var content = $('#content').val();
if ( content != '') {
$("#save_btn").css({"background": "#8EE2D3"});
$("#save_btn").css({"background": "#C45EFF"});
$("#save_btn").prop("disabled", false);
}else{
$("#save_btn").css({"background": "#AAA8A8"});
......@@ -116,7 +116,7 @@
layer.msg('提交成功',{},function(){
location.reload();
});
}else{
layer.msg(result.errormsg);
}
......@@ -132,5 +132,5 @@
}
$(function(){
$("#content").css({"height":$(window).height() *0.5+"px"});
$('#save_btn').on('click', save);
})
\ No newline at end of file
$('#save_btn').on('click', save);
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment