我想将一个数组或一个arraylist作为参数值传递给javascript方法而不是我现在传递的字符串
以下代码:
String url = javascript:deviceList("{\"requestID\":\"1000\",\"deviceList[i]":\"[com.Experiment5.bluetooth.BluetoothDevices;@4a35cff0\" }")
webView.loadUrl(url);
和javascript代码:
deviceList : function (response) {
response = JSON.parse(response);
//jQuery("#messagebox").show();
out = '<select id="bluetoothList">';
for (i = 0; i < response.deviceList.length; i++) {
out += "<options>" + response.deviceList[i].deviceId
+ "</options>";
}
out += '<select>';