使用AJAX发送插件

I need to send navigator plugins with AJAX, but I don't get full result:

Plugin list: Shockwave Flash. (I get just one plugin)

It has to be like this: Shockwave Flash - Chrome Remote Desktop Viewer - Native Client...

<script>
for (var myIndex = 0; myIndex < navigator.plugins.length; myIndex++) {
    var blabla = (navigator.plugins[myIndex].name);
}
$.ajax({
    type: 'POST',
    url: 'save.php',
    cache: false,
    data: {
        pluginlist: blabla,
    },
});  
</script>

What am I doing wrong?

One more thing...

When i test this script, it wroks fine.

<SCRIPT>
for (var myIndex=0; myIndex<navigator.plugins.length; myIndex++) {
    document.write(navigator.plugins[myIndex].name, " - ");
}
</SCRIPT>
查看全部
weixin_33738982
?Briella
2013/03/31 14:59
  • ajax
  • javascript
  • 点赞
  • 收藏
  • 回答
    私信

1个回复