开发者

indexof error html page

开发者 https://www.devze.com 2023-03-24 02:16 出处:网络
I have an error when i\'m going to do this operation: if(file.i开发者_JS百科ndexOf(\"message\") > 0)

I have an error when i'm going to do this operation:

if(file.i开发者_JS百科ndexOf("message") > 0)
   txtview.setText(file.indexOf("message"));

Where is the problem? The var file contains the html source of a web page.


try this code

txtview.setText(""+file.indexOf("message"));

you pass the integer value while this method require string

0

精彩评论

暂无评论...
验证码 换一张
取 消