他们是从Jquery或Javascript更新xml的任何方式 [英] Is their any way to update xml from Jquery or Javascript

查看:101
本文介绍了他们是从Jquery或Javascript更新xml的任何方式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

他们以任何方式从Jquery或Javascript更新xml



我想在每次点击时设置好



Is their any way to update xml from Jquery or Javascript

I want to set couter on each click

function SetCount() {
           $.ajax({
               url: 'DownloadCount.xml', // name of file you want to parse
               dataType: "xml", // type of file you are trying to read
               success: parse, // name of the function to call upon success
               error: function() { alert("Error: Something went wrong"); }
           });
           function parse(document) {

               $(document).find('apk').each(function() {

             $(this).find('count').text("30");


               });


           }



i陷入困境如何在没有代码的情况下更新原始文件


i am stuck at point how to update original file without code behind

推荐答案

.ajax({
url:' DownloadCount.xml' // 您要解析的文件名称
dataType: xml // 您尝试阅读的文件类型
成功:解析, // 成功时要调用的函数的名称
错误: function (){alert( 错误:出错了);}
});
function parse( document ){
.ajax({ url: 'DownloadCount.xml', // name of file you want to parse dataType: "xml", // type of file you are trying to read success: parse, // name of the function to call upon success error: function() { alert("Error: Something went wrong"); } }); function parse(document) {


document )。find(' apk' ).each( function (){
(document).find('apk').each(function() {


this ) .find(' count')。text( 30);


});


}
(this).find('count').text("30"); }); }



i陷入困境,如何在没有代码的情况下更新原始文件


i am stuck at point how to update original file without code behind


这篇关于他们是从Jquery或Javascript更新xml的任何方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆