I will not introduce JqueryUIDialog, but some of the attributes can be found here: I will not talk about what files need to be introduced. Give a Website: http://www.cnblogs.com/haogj/archive/2011/02/16/1956267.html (I'm really lazy .) I am focusing on D... Syn
I will not introduce Jquery UI Dialog, but some of the attributes can be found here:
As for what files need to be introduced, I will not mention it. Give a Website: http://www.cnblogs.com/haogj/archive/2011/02/16/1956267.html (I'm really lazy .)
I am focused on the problem of submitting the Form of Dialog.
I don't know how to use Dialog. Let me talk about the method.
[Html]
[Javascript]
$ ("# Dialog"). dialog ({
Modal: true,
AutoOpen: false,
Buttons :{
"OK": function (){
Var form = $ ("# dialogForm ");
$. Ajax ({
Url: form. attr ('action '),
Type: form. attr ('method '),
Data: form. serialize (),
DataType: "json ",
Success: function (data ){
$ ("# Dialog"). dialog ("close ");
Alert ("succeeded ");
},
Error: function (){
$ ("# Dialog"). dialog ("close ");
Alert ("error occurred ");
}
}
},
"Close": function (){
$ ("# Dialog"). dialog ("close ");
}
}
});
In this way, you can directly write the form in the div. Then form. serialize () gets all the data. It's easy.
I have been entangled in this issue for a long time. It is inconvenient and not practical to look at foreign websites. I will find it myself.
If you have any questions, please leave a message.