Home > front end >  The fileinput with fileuploaded returned results, take out, what's the problem
The fileinput with fileuploaded returned results, take out, what's the problem

Time:11-16

 $(' # ChordCover) on (" fileuploaded ", function (previewId event, data, index) {

Var data=https://bbs.csdn.net/topics/data.response.url;
If (undefined) data=https://bbs.csdn.net/topics/={
Toastr. Error (' incorrect file format type);
return;
}
//1. Initialization form
Data=https://bbs.csdn.net/topics/data.substr (data. LastIndexOf (" files/") + 6);
Smodel. ChordCover=data;
$(' # Hidden_ChordCover). Val (data);
Alert (' : '+ $(' # Hidden_ChordCover). Val ());
The console. The log (' dd: + $(' # Hidden_ChordCover). Val ());



});
}
Alert (' : '+ $(' # Hidden_ChordCover). Val ());

Whether it is a global variable, or control, can only in there is value, in this event becomes empty, the outside is what problem, how to make them effective global!

CodePudding user response:

Regardless of the original $(' # ChordCover.) on (" fileuploaded ",,,, in front or behind is performed first, outside to get to his, how to do, is there any way, such as after uploading the file, and then execute the following code

CodePudding user response:

Event listeners, you don't event is triggered, how to get the value from the outside???????

You can add one more button, click event will print that value, you said, however, is after you first fileuploaded above the trigger event to trigger
  • Related