$.ajax({
type: "post",
url: "Default.aspx?cmd=Setting",
success: parseXml
});
function parseXml(xml)
{
alert(xml);//show Full XML File
//find every Tutorial and print the author
$(xml).find("Tutorial").each(function()
{
$("#a").append($(this).attr("author") + "
");
});
}
HTML
代码
protected void Page_Load(object sender, EventArgs e)
{
if (Request["cmd"] == "Setting")
{
string [email protected]"<?xml version='1.0' encoding='utf-8' ?>
Silverlight and the Netflix APITutorials
Silverlight 2.0
Silverlight
C#
XAML
1/13/2009
";
Response.Write(k);
Response.End();
}
}
我是一个初学者。
这不起作用。
while alert(xml)show xml File。
2011-03-13
beginner
+0
请定义“不工作”。 –
+0
您是否尝试过'alert(xml);''parseXml'内部 –
+0
show xml但不会附加到div –