www.gusucode.com > 51:【198-3365】仿寻模板网页模板下载素材销售下载站平台织梦模板 > 51:【198-3365】仿寻模板网页模板下载素材销售下载站平台织梦模板/member/up/fx1.js

    function checkSubmit()
{
if(document.form1.title.value==""){
		alert("标题不能为空!");
		document.form1.title.focus();
		return false;
	}
	

if(document.form1.typeid.value==0){
		alert("隶属栏目必须选择!");
		return false;
	}

if(document.form1.typeid.options && document.form1.typeid.options[document.form1.typeid.selectedIndex].className!='option3')
{
	alert("隶属栏目必须选择白色背景的项目!");
	return false;
}
	if(document.form1.litpic.value.length<=0){
		alert("请上传缩略图!");
		return false;
	}
	if(document.form1.softurl1.value.length<=0 || document.form1.softurl1.value==document.form1.softurl1.defaultValue){
		alert("请上传模板压缩包!");
		return false;
	}
	
	

}




$(document).ready(function() {
//缩略图
	$("#litpicup").uploadify({
		'uploader'       : 'up/uploadify.swf',
		'script'         : 'up/uploadify.php?id=litpic',
		'cancelImg'      : 'up/cancel.png',//取消图片

		'buttonText'     : '',//按钮文字
		'buttonImg'      : 'up/up_img_btn.gif',//按钮图片
		'width'			 : '145',//按钮的宽度 ,默认值:110
		'height'		 : '42',//按钮的高度 ,默认值:30
		'queueID'        : 'fileQueue',//文件队列的ID
		'fileDataName'   : 'Filedata',//处理程序中根据该名字来取上传文件的数据。默认为Filedata

		'fileDesc'		 : '请选择JPEG/GIF/PNG 格式图片', //如果配置了以下的'fileExt'属性,那么这个属性是必须的 
		'fileExt'		 : '*.jpg;*.gif;*.jpeg;*.png',//允许的格式   

		'sizeLimit'		 : 2097152,//文件的大小,单位byte2097152
		'wmode'			 : 'transparent',//设置该项为transparent 可以使浏览按钮的flash背景文件透明,并且flash文件会被置为页面的最高层。 默认值:opaque
		'auto'           : true, //true就直接上传,为false需要点击上传按钮才上传
		'multi'          : false,//是否多文件 
		onSelect		: function ()   //开始上传
							 {
							 $("#fileQueue").fadeIn('fast');
							 }, 
	 	onComplete       : function (event, queueID, fileObj, response, data)   //上传结束
							 {
							 $("#fileQueue").fadeOut('fast');
							// $("#litpicout").fadeOut('fast');
							 $("#msg").html(response);
							 }
	

	});
	
	$("#softurl1up").uploadify({
		'uploader'       : 'up/uploadify.swf',
		'script'         : 'up/uploadify.php?id=softurl1',
		'cancelImg'      : 'up/cancel.png',//取消图片

		'buttonText'     : '',//按钮文字
		'buttonImg'      : 'up/swfupload_start.gif',//按钮图片
		'width'			 : '145',//按钮的宽度 ,默认值:110
		'height'		 : '42',//按钮的高度 ,默认值:30

		'queueID'        : 'fileQueue1',//文件队列的ID
		'fileDataName'   : 'Filedata',//处理程序中根据该名字来取上传文件的数据。默认为Filedata

		'fileDesc'		 : '压缩包.RAR/.ZIP/.7Z', //如果配置了以下的'fileExt'属性,那么这个属性是必须的 
		'fileExt'		 : '*.rar;*.zip;*.7z',//允许的格式   

		'sizeLimit'		 : 51457280,//文件的大小,单位byte2097152
		'wmode'			 : 'transparent',//设置该项为transparent 可以使浏览按钮的flash背景文件透明,并且flash文件会被置为页面的最高层。 默认值:opaque
		'auto'           : true, //true就直接上传,为false需要点击上传按钮才上传
		'multi'          : false,//是否多文件 
		onSelect		: function ()   //开始上传
							 {
							 $("#fileQueue1").fadeIn('fast');
							 }, 
	 	onComplete       : function (event, queueID, fileObj, response, data)   //上传结束
							 {
							 $("#fileQueue1").fadeOut('fast');
							// $("#softurl1out").fadeOut('fast');
							 $("#msg1").html(response);
							 }
	});
});