我有这个 JavaScript。在 jquery 移动。我希望它只显示在这个 div 中。现在当我运行它时,它不显示任何样式或 jquery。只显示javascript。
<%@ Page Title="" Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false"
CodeFile="phonedirectory.aspx.vb" Inherits="phonedirectory" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
<meta name="viewport" content="width=device-width, initial-scale=1">
<div class="timeline" id="lists" data-role="content">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<div data-role="page">
<div data-role="header" data-theme="c">
<center>
<a href="Default.aspx">
<img src="Content/images/logo.png" /></a></center>
</div>
<script language="javascript" type="text/javascript">
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else {// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.read
xmlhttp.open("GET", "xml.aspx", false);
xmlhttp.send();
xmlDoc = xmlhttp.responseXML;
document.write("<ul id='employee' data-role='listview' data-filter='true'>");
var x = xmlDoc.getElementsByTagName("employee");
for (i = 0; i < x.length; i++) {
document.write("<li class='ui-screen-hidden'>")
document.write("<a href='info.aspx?ID=");
document.write(x[i].getElementsByTagName("ID")[0].childNodes[0].nodeValue);
document.write("'>")
document.write(x[i].getElementsByTagName("Name")[0].childNodes[0].nodeValue);
document.write("</a></li>");
}
document.write("</ul>");
</script>
</div>