function replaceMessage(){
var oldnode= document.getElementById ("oldnode");
var txt=oldnode.innerHTML;
var newnode=document.createElement("i");
newnode.innerHTML=txt;
oldnode.parentNode.replaceChild(newnode,oldnode);
var oldnode= document.getElementById ("oldnode");
var txt=oldnode.innerHTML;
var newnode=document.createElement("i");
newnode.innerHTML=txt;
oldnode.parentNode.replaceChild(newnode,oldnode);
2015-04-30
document.write(mylist.parentNode.parentNode.parentNode.childNodes[7].firstChild.nodeValue);
2015-04-30
//创建数组
var arr = ['*','##',"***","&&","****","##*"];
arr[7]="**";
//显示数组长度
document.write(arr.length);
//将数组内容输出,完成达到的效果。
document.write("<br>"+arr[0]+"<br>"+arr[7]+"<br>"+arr[2]+"<br>"+arr[4]);
var arr = ['*','##',"***","&&","****","##*"];
arr[7]="**";
//显示数组长度
document.write(arr.length);
//将数组内容输出,完成达到的效果。
document.write("<br>"+arr[0]+"<br>"+arr[7]+"<br>"+arr[2]+"<br>"+arr[4]);
document.write(myarr1.slice(myarr1.indexOf("爱"),myarr1.indexOf("你")+1))
2015-04-30
document.write(mystr.substr(mystr.indexOf("World!"),"world!".length) + "<br />");
document.write(mystr.substr(mystr.indexOf("Hello"),"Hello".length));
document.write(mystr.substr(mystr.indexOf("Hello"),"Hello".length));
2015-04-30
document.write(mystr.substring(mystr.indexOf("World"),mystr.length)+ "<br />");
document.write(mystr.substring(mystr.indexOf("Hello"),mystr.indexOf("Hello")+"Hello".length));
document.write(mystr.substring(mystr.indexOf("Hello"),mystr.indexOf("Hello")+"Hello".length));
2015-04-30