我希望能够通过ajax调用info ['id'] ...
var setEditor = function()
{
this.info = {
'id' : 1 // <--------------- i want this
};
var cardEditor = function()
{
var status = {
'touched' : false,
'id' : 0
};
card.children('input').bind('focusout', function() {
alert(this.info['id']); // <----------------- through this
$.ajax({
type : 'POST',
url : '../addcard',
data : 'name=John&location=Boston',
dataType : 'json',
success: function(msg){
$('#rec').html(msg);
}
});
});
};
};
set = new setEditor();
Run Code Online (Sandbox Code Playgroud) 我想用文本做一个小的文本高度div运行.我的代码看起来像这样:
blah blah blah <div style="display:block; float: left; width: 100px">[IN A DIV]</div> blah
Run Code Online (Sandbox Code Playgroud)
它应该看起来像:
blah blah blah [IN A DIV] blah blah
Run Code Online (Sandbox Code Playgroud)
但它总是出现:
blah blah blah
[IN A DIV]
blah blah
Run Code Online (Sandbox Code Playgroud)