解决方案 »
- 小问题,Object对象的转换
- TheadGroup有什么用?
- JAVA 编程的问题
- 求助httpclient访问问题 高手进
- 哪个高手给我看个问题?
- 请问import得问题?
- 让我无言以对:“Could not find C:/struts.jar to copy to WebApp website; file is defined as element of library struts”
- 60分相送:如何进行Client与Server间的HTTP通讯
- JNDI问题
- *******我觉得这个问题有点难度,关于Swing,请进
- 什么是轻量级锁,偏向锁???
- java学习遇到的问题,大神支支招
获取元素,remove掉属性具体方法需要查API
int titleLocation = aa.indexOf("title");
int targetLocation = aa.indexOf("target");
System.out.println(titleLocation + " " + targetLocation);
String aaNew = aa.substring(0, 20) + aa.subSequence(33, aa.length());
System.out.println(aaNew);代码仅供参考
String aa = "<a href='baidu.com' title='百 度' target='_blank'>百度</a>";
int titleLocation = aa.indexOf("title");
int targetLocation = aa.indexOf("target");
System.out.println(titleLocation + " " + targetLocation);
String aaNew = aa.substring(0, titleLocation ) + aa.subSequence(targetLocation, aa.length());
System.out.println(aaNew);