Java代码
-
//需要访问的网址
String url = "http://www.cqjg.gov.cn/netcar/FindThree.aspx";
-
//post访问需要提交的参数
String postDate = "txtName=zzz&QueryTypeLst=1&CertificateTxt=dsds";
-
//由于
webView.postUrl(url, postData)
中postData
类型为byte[]
-
通过
EncodingUtils.getBytes(data, charset)
方法进行转换
webView.postUrl(url, EncodingUtils.getBytes(postDate, "BASE64"));
网友评论