我创建了新的 Windows 8 HTML 5 应用程序。我向其中添加了 jquery 文件。但是Hello World!
没有打印出来TextBox
MainPage.xaml.cs
private void Browser_Loaded(object sender, RoutedEventArgs e)
{
// Add your URL here
Browser.IsScriptEnabled = true;
Browser.Navigate(new Uri(MainUri, UriKind.Relative));
}
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" />
<title>Windows Phone</title>
<script type="text/javascript" src="~/Scripts/jquery-2.0.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function (){
$("#test").val("Hello World!");
});
</script>
</head>
<body>
<div>
<p>Climate</p>
</div>
<div id="page-title">
<p>My Climate</p>
<input type="text" id="test" />
</div>
</body>
</html>