function Getajxa(options) {
var settings = jQuery.extend({
src: null,
data: "",
type: "get",
dataType: "html",
async: false
}, options);
options = settings;
if (options.src == null || options.src == "") {
alert("请设置一个ajxa用于请求的src地址!");
return;
}
var result = null;
$.ajax({
url: options.src,
data: options.data,
type: options.type,
dataType: options.dataType,
async: options.async,
success: function (msg) {
result = msg;
}, error: function () {
result = "err";
}
})
return result;
}
var bet_mode = Getajxa({
src: "/ajax/get_bet_mode",
data: { gid: yaohao_para.id }
});
bet_mode = change_json(bet_mode);
if (bet_mode.status == 1) {
var $msg = bet_mode.msg;
var $text = "";
for (var i = 0; i < $msg.length; i++) {
$text += "<option value=\"" + $msg[i].id + "\"";
if (i == 0) {
$text += " selected";
}
$text += ">" + $msg[i].name + "/每注</option>";
}
}