2013-02-25 45 views
0

我已经创建了一个mvc3项目,但未选择HTML标记语义支持复选框。现在我正在尝试在我的项目中使用knockout js。由于淘汰赛只适用于html5,因此我从visual studio中选择html5调试模式。但ko.applyBinding不work.please帮助..如何在mvc3中获得html5和挖空支持

+0

发布代码,问题似乎在其他地方 – dakait 2013-02-25 10:26:42

+0

你可以添加你的完整代码 – nav0611 2013-02-25 10:26:48

回答

0

可能你的问题是绑定ko。

尝试绑定您的视图模型特定DIV ID如下面code.It可以解决您的概率

的Html

<div id="container_id"> 
... 
<div> 

脚本: -

ko.applyBindings(new AppViewModel(), document.getElementById('container_id')); 
0
For HTML 5 you need to change your HTML structure like below way. 

<!DOCTYPE html> 
<html> 
<head> 
</head> 
<body> 
// Body content will come here. 
</body> 
</html>