✍ 📁 🙈 🙉 🙊
HTML
window Resize
html 測試 左入右出
html 測試 上入下出
html 測試 單入單出
html 測試 左單右單
dialog window
自製 彈出對話視窗 Self made dialogue window
<div id="DP"> <input type="button" onclick="MYalert('Self made dialogue window <br> 自製 彈出對話視窗')" value="Self made dialogue window 自製 彈出對話視窗" > <script> ; function Cclose(xx){ ; ckalert.remove() ; ckalerttxt.remove() ; document.body.style.overflow="scroll" ; } // function MYalert(xx){ ; var newDiv = document.createElement("div"); newDiv.id="ckalert" ; document.body.appendChild(newDiv) ; ckalert.style.position = "absolute"; ckalert.style.width = "100%" ; ckalert.style.height = "100%" ; ckalert.style.left = "0px" ; ckalert.style.top = "0px" ; ckalert.style.backgroundColor ="rgba(192,192,192,0.6)" ; ckalert.style.zIndex = "99"; var newDiv = document.createElement("div"); newDiv.id="ckalerttxt" ; document.body.appendChild(newDiv) ; ckalerttxt.style.position = "absolute"; ckalerttxt.style.padding = "20px"; ckalerttxt.style.textAlign = "center"; ckalerttxt.style.backgroundColor ="rgba(255,255,240,0.6)" ; ckalerttxt.style.zIndex = "999"; ckalerttxt.style.width = "100%"; ckalerttxt.style.left = "0%" ; ckalerttxt.style.top = "100px" ; ckalerttxt.innerHTML = xx ; ckalerttxt.innerHTML += "<br>" ; var tt = "<button type='button' onclick='Cclose()'>close</button>" ; ckalerttxt.innerHTML += tt ; document.body.style.overflow="hidden"; } </script> </div> <div id="PG"></div> <script> var txt = DP.innerHTML ; txt = txt.replace( /</g ,"<<c>" ) txt = txt.replace( /;/g ,";<br>" ) txt = txt.replace( "//" ,"<br><br>" ) txt = txt.replace( /<<c>script>/ ,"<br><br><<c>script>" ) PG.innerHTML = "<br>" + txt ; </script>
預覽
寫程式
還原
LLLLLLLLLLLLLLLLL
Edit
#html
#網頁格式
#style
#div
#alert()
#dialog window
#對話框窗口
沒有留言:
張貼留言
較新的文章
較舊的文章
首頁
訂閱:
張貼留言 (Atom)
沒有留言:
張貼留言