日期:2014-05-16 浏览次数:20735 次
function getAjaxList(explorer, pageno) {
$
.post(
"Community_Dictionary.asp",
null,
function(json) {
var jsonLength = json.list.length;
var dictionaryData = "";
if (jsonLength > 0) {
dictionaryData = "<div style='margin-bottom:10px;background-color:#d6efac;line-height:28px;padding-left:20px;'><img src='/house/img/xz_tb.gif'/><font color=green><b>选择小区</b></font>(如下列表中不存在,点此<a id='create-new-floor' href='javascript:void(0)'><font color=red>+新建小区</font></a>)</div>";
for ( var i = 0; i < json.list.length; i++) {
var Community_ID = json.list[i].Community_ID;
var Community = json.list[i].Community;
var Address = json.list[i].Address;
if (Address == "null")
Address = "";
var Area_ID = json.list[i].Area_ID;
dictionaryData = dictionaryData
+ "<div style='height:22px;line-height:29px;padding-left:40px;overflow:hidden;'><img src='/house/img/sjy_x.gif'/><a class='item' href=\"javascript:;\" onClick=\"javascript:selectFloor("
+ "'" + Community_ID + "'," + "'" + Community
+ "','" + Address + "','" + Area_ID + "');\"><font color=#ff6200>"
+ Community + "</font></a><font color=#565e53> " + Address
+ "</font></div>";
}
//dictionaryData += "<a id='create-new-floor' href='javascript:void(0)'>列表中不存在,<span style='color:red;font-size:16px;'>点此</span>新建小区</a>";
} else {
dictionaryData += "<a id='create-new-floor' href='javascript:void(0)'>列表中不存在,<span style='color:red;font-size:16px;'>点此</span>新建小区</a>";
}
$("#dictionary").html(dictionaryData);
$("#create-new-floor").click(onCreateNewFloor_Click);
}, "json");
}
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script>
getAjaxList(0,0)
function getAjaxList(explorer, pageno) {
$.post(