function GetValue () {
var str = $ ("#selectid option:selected"). Val (); Get the selected value
var num = $ ("input[name= ' num ')"). Val ();
var pwd = $ ("Input[name= ' pwd ']"). Val ();
var Jr = parsefloat ($ ("#x-MONEY-JR"). html ());
var dd = parsefloat ($ ("#x-money-dd"). html ());
$.ajax ({
Type: "Post",
DataType: "HTML",
URL: "Index.php?ctl=le&act=cutm",
data:{' met ': str, ' num ': num, ' pwd ':p wd},
Success:function (msg) {
if (msg) {
var x_msg = {
1: ' Transaction password error ',
0: ' Turn out path not confirmed ',
2: ' Please enter the correct amount ',
3: ' Transaction amount overflow ',
5: ' Trading success '
};
Alert (x_msg[msg]);
if (msg==5) {
if (str==1) {
$ ("#x-MONEY-JR"). HTML (jr-parsefloat (num));
$ ("#x-money-dd"). HTML (dd+parsefloat (num));
}
if (str==2) {
$ ("#x-MONEY-JR"). HTML (jr+parsefloat (num));
$ ("#x-money-dd"). HTML (dd-parsefloat (num));
}
}
}
}
});
}
Ajax Create object validation