我努力创建用户与主干的互动网页。 js & php。 但是,在我提交html表格时,我能够称职。 任何人都能够帮助我?
这里是法典
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.js"></script>
<script type="text/javascript" src="http://documentcloud.github.com/underscore/underscore.js"></script>
<script type="text/javascript" src="http://documentcloud.github.com/backbone/backbone.js"></script>
<!--- Here are the backbone code --->
<script type="text/javascript">
var FamilyModel = Backbone.Model.extend({
defaults: {
name: "Corleone"
},
url: "back.php"
});
var FamilyList = Backbone.Collection.extend({
model: FamilyModel
});
var FamilyListView = Backbone.View.extend({
el: $( #SampleForm ),
model: FamilyModel,
events: {
click #Submit : createOne
},
createOne: function(e){
e.preventDefault();
alert( Yes );
}
});
// Fire up the application:
window.App = new FamilyListView;
</script>
<!-- //HTML -->
<form name="SampleForm" id="SampleForm">
<table>
<tr><td>Name:</td><td><input type="text" name="varName"></td></tr>
<tr><td>Age:</td><td><input type="text" name="intAge"></td></tr>
<tr><td>Mobile:</td><td><input type="text" name="intMobile"></td></tr>
<tr><td colspan="2" align="center"><input type="submit" name="Submit" id="Submit" value="ADD"></td></tr>
</table>
</form>
Expecting your valuable response ASAP. Thanks