|
@@ -6,9 +6,9 @@
|
|
|
//自定义验证规则
|
|
|
form.verify({
|
|
|
context: function(value){
|
|
|
- if(value.length <=0){
|
|
|
- return '请选择导入的文件';
|
|
|
- }
|
|
|
+ if(value.length <=0){
|
|
|
+ return '请选择导入的文件';
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
var newText1 = parent.$('#addtext').val();
|
|
@@ -16,20 +16,24 @@
|
|
|
})
|
|
|
function doSubmit(obj){
|
|
|
if ($("#myfile").val()==null||$("#myfile").val()==""){
|
|
|
- layer.msg("请选择文件",{icon: 3});
|
|
|
- throw SyntaxError;
|
|
|
- }
|
|
|
- if ($("#inputwrite").val()==null||$("#inputwrite").val()==""){
|
|
|
- layer.msg("请输入项目名称",{icon:3});
|
|
|
- throw SyntaxError;
|
|
|
+ layer.msg("请选择文件",{icon: 3});
|
|
|
+ throw SyntaxError;
|
|
|
+ }
|
|
|
+ if ($("#inputwrite").val()==null||$("#inputwrite").val()==""){
|
|
|
+ layer.msg("请输入项目名称",{icon:3});
|
|
|
+ throw SyntaxError;
|
|
|
+ }
|
|
|
+ $("#inputForm").submit();
|
|
|
}
|
|
|
- $("#inputForm").submit();
|
|
|
-}
|
|
|
- $("#btnxz").click(function(){
|
|
|
- $("#myfile").trigger("click");
|
|
|
+ $(document).ready(function() {
|
|
|
+ // 选择文件触发事件
|
|
|
+ $("#btnxz").click(function(){
|
|
|
+ $("#myfile").trigger("click");
|
|
|
+ })
|
|
|
+
|
|
|
+ $("#myfile").bind("change",function(){
|
|
|
+ var solr_file= $("#myfile").val();
|
|
|
+ $("#view_input").val(solr_file);
|
|
|
})
|
|
|
- $("#myfile").bind("change",function(){
|
|
|
- var solr_file= $("#myfile").val();
|
|
|
- $("#view_input").val(solr_file);
|
|
|
})
|
|
|
</script>
|