一个href onclick不工作在windows phone cordova应用程序 [英] a href onclick not working in windows phone cordova app

查看:141
本文介绍了一个href onclick不工作在windows phone cordova应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用winstore-jscompat.js修复js。下面的代码生成子类。
但它不调用parseSubCategory函数。

I have used winstore-jscompat.js for js fix. below code generate sub categories. But it doesnt call parseSubCategory function.

            $.each(category.sub_categories, function(index2, subcategory) {
                   var subCatName = subcategory.name;
                   $("#test-listview" + index).append('<li><a onclick=\"parseSubCategory(' + subcategory.id + ',\'' + subCatName + '\');\" href="#product_List">' + subcategory.name + '</a></li>');

             });

编辑:

推荐答案

发生问题是因为从外部来源提取了可能不安全的内容。我们可以修改jquery源并忽略它。我在这里找到了解决方案。

Issue happened because of pulling in potentially unsafe content from an external sources. We can modify jquery source and ignore this. I have found the solutions here.

https://www.incloud.de/2012/08/windows-8-using-jquery-for-app-development/

它适用于我。

这篇关于一个href onclick不工作在windows phone cordova应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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