ajax扩展控件的使用,使用$.extend()扩展Object对象

使用$.extend()扩展Object对象

合并原有对象

$(function () {

var objInfo = { name: "" };

var objMess = { name: "白富美,", title: "欢迎与我联系!" };

var objNewInfo =?;

var strTmp = "对象 白富美 合并后
";

strTmp += objNewInfo.name + objInfo.title;

//显示在页面中

$(".tip").show().append(strTmp);

});

#divtest

{

width: 282px;

}

#divtest .title

{

padding: 8px;

background-color: Blue;

color: #fff;

height: 23px;

line-height: 23px;

font-size: 15px;

font-weight: bold;

}

#divtest .content

{

padding: 8px;

background-color: #fff;

font-size: 13px;

}

#divtest .content .tip

{

border: solid 1px #ccc;

background-color: #eee;

margin: 10px 0px;

padding: 8px;

display: none;

}

.fl

{

float: left;

}

.fr

{

float: right;

}