2013-02-25 16 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>