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>