chrome浏览器添加个性标签,可以弹出代码编辑器

javascript:void((function(){ if(document.getElementById("yimlu-div")){ document.getElementById("yimlu-div").style.display="block"; }else{ var yimluDiv = document.createElement("div"); yimluDiv.setAttribute("id","yimlu-div"); yimluDiv.style.position="absolute"; yimluDiv.style.right="10px"; yimluDiv.style.top="5px"; yimluDiv.style.border="2px solid red"; yimluDiv.style.backgroundColor="black"; yimluDiv.style.zIndex="9999"; yimluDiv.style.height="610px"; yimluDiv.style.width="500px"; var yimluInput = document.createElement("input"); yimluInput.setAttribute("id","yimlu-input"); yimluInput.type="button"; yimluInput.value="Close"; yimluInput.style.position="absolute"; yimluInput.style.right="5px"; yimluInput.style.top="5px"; var yimluIframe = document.createElement("iframe"); yimluIframe.src = "http://www.mcqyy.com/RunCode/java/"; yimluIframe.setAttribute("width","100%"); yimluIframe.setAttribute("height","550px"); yimluIframe.style.marginTop="30px"; yimluDiv.appendChild(yimluInput); yimluDiv.appendChild(yimluIframe); document.body.appendChild(yimluDiv); document.getElementById("yimlu-input").onclick = function(){ document.getElementById("yimlu-div").style.display="none"; }; } })());

你可能感兴趣的:(chrome浏览器添加个性标签,可以弹出代码编辑器)