1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
//GET $.get(script_root + "/matches_info", function (data) { matches = $.parseJSON(JSON.stringify(data)); $('#matches-board').empty(); for (var i = 0; i <= matches['matches'].length - 1; i++) { var match_info = matches['matches'][i]; $('#matches-row').find(".category-challenges > .challenges-row").append(match_wrap); }; $('.match-button').click(function (e) { load_match(this.value); }); }); //POST $.post(script_root + '/create_team', { 'teamname': $(" input[ name='teamname' ] ").val(), 'nonce': $(" input[ name='nonce' ] ").val() }, function (data) { if (data == 'success') { parent.location.href="team"; } else { var content=data; ezal({ title: "失败", body: content, button:"确认" }); } }); |