HTML Code代码段:
<fieldset id="o-bs-sum-buginfo">
<label for="o-bs-sum-bug-ErrorPrefix">Error Prefix</label>
<input type="text" id="o-bs-sum-bug-ErrorPrefix" name="ErrorPrefix" value="" />
<label for="o-bs-sum-bug-ErrorNumber">Error Number</label>
<input type="text" id="o-bs-sum-bug-ErrorNumber" name="ErrorNumber" value="" />
....
</fieldset>
Run Code Online (Sandbox Code Playgroud)
仅使用CSS(或jquery),无论浏览器大小如何,我都想将标签和输入元素彼此相邻配对.我也有自由改变HTML的调整.如果需要.
我明确指定了一个POST,我没有在Request中看到post数据,而且更多的指定它有一个OPTIONS.
响应应该是HTML,以表格格式指定匹配用户到Query.我试图发布和阅读html来创建一个自动完成输入框.
这个Jquery代码:
$.post('https://internal.company.com/data/displayUserList',
{ Email: "", Name: "%GEORGE%"},
function(responseText, textStatus) {
console.log("Response:\n" + responseText + textStatus)
}
);
Run Code Online (Sandbox Code Playgroud)
FireBug1.6.1捕获的请求(Firefox)
OPTIONS /data/displayUserList HTTP/1.1
Host: internal.company.com
User-Agent: Mozilla/5.0 Firefox/3.6.8
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Origin: null
Access-Control-Request-Method: POST
Run Code Online (Sandbox Code Playgroud) 我有以下路线
App.Router.map(function() {
this.resource('projects', {path: 'projects'}, function(){
this.route('new', {path: 'new'});
this.route('show', {path: ':project_id'});
this.route('edit', {path: ':project_id/edit'});
});
});
Run Code Online (Sandbox Code Playgroud)
我希望'ProjectsNewController','ProjectsShowController','ProjectsEditController'中的所有事件都冒泡到'ProjectsController'.
我怎样才能达到这个目的?JSBin:http://jsbin.com/ucanam/1284/edit
JSFiddle - http://jsfiddle.net/9gA4y/1/
我有以下型号:
contact => (many2many) => tags
contact => (one2many) => address
Run Code Online (Sandbox Code Playgroud)
Ember数据模型:
App.Contact = DS.Model.extend({
name: attr('string'),
tags: hasMany('App.Tag'),
addresses: hasMany('App.Address')
});
App.Address = DS.Model.extend({
street: attr('string'),
country: attr('string'),
contacts: belongsTo('App.Contact')
})
App.Tag = DS.Model.extend({
name: attr('string'),
contacts: hasMany('App.Contact')
});
Run Code Online (Sandbox Code Playgroud)
我想出了添加新的联系人记录