我想转换这个:
<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>