0
我想转换此:删除由子和的indexOf标签和它的内容在JavaScript
<html>
s
<RB:Block_Left>sss</RB:Block_Left>
s
hello
</html>
此,
<html>
s
s
hello
</html>
这个代码必须是喜欢我的文字区域做它,但不能工作!
<textarea id ="code">
<html>
s
<RB:Block_Left>sss</RB:Block_Left>
s
hello
</html>
</textarea>
<br />
<input type="button" value="makeit!" onclick="ARAS()" />
<br />
<textarea id ="newcode">
</textarea>
<script>
function ARAS(){
str=document.getElementById('code').value;
str=str.substring( + str.indexOf('<html>') - str.indexOf('<\/RB:Block_Left>') + str.indexOf('<\/RB:Block_Left>'));
document.getElementById('newcode').value=str;
}
</script>