我正在使用Visual Studio 2012創建示例Windows 8 Phone應用程序。Jquery不適用於在Visual Studio 2012中使用HTML 5模板創建的Windows 8 Phone應用程序
從我選擇了 「創建新項目」 選項,
的Windows> Windows Phone的HTML5應用
我還添加了一個jquery.min.js文件,以項目爲示下面。
下面是我編寫的代碼中的index.html ...
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="/html/css/phone.css" />
<script type="text/javascript" src="/html/js/jquery.min.js" ></script>
<title>Windows Phone</title>
<script type="text/javascript">
$("#dynamic-box").text("hey !");
</script>
</head>
<body>
<div>
<p>MY APPLICATION</p>
</div>
<div id="dynamic-box"></div>
</body>
</html>
但無論我怎麼努力我的jQuery代碼只是不會工作。有沒有其他的方式在jQuery中寫入Windows 8 Phone應用程序?
請幫我解決這個問題。
謝啦。 。 有效 ! – Yasser
另外,您需要使用MS批准的jQuery版本。 您可以使用NuGet包管理器(Project> Manage NuGet Packeges)將其添加到您的項目中。 – codingPear