最新回答 / 慕田峪146999
var txt = document.getElementById("txt");? ? ? ? txt.removeAttribute("style");????//取消設置的代碼
2020-05-17
open()中的參數 有第二個,必須要有第一個,要有第三個,前兩個必須有而且還要在其之前,要不然就會有顯示問題。也就是說,參數值的位置是固定的,第一個參數就是地址,第二按參數就是窗口名稱,第三個就是窗口限制條件。
2020-05-15
最新回答 / 奕帝傳說_夢
我的實現是把txt原本樣式保留,然后新建一個txt2來做其他的樣式。在第一次改變時做一個If判斷如果nowdom.className=="txt"就首先nowdom.className="txt2",然后再進行隨便修改。最后如果要返回就直接nowdom.className="txt"就完事了
2020-05-11
<script type="text/javascript">
var mychar= document.getElementById("con");
mychar.style.color="red";
mychar.style.backgroundColor="#ccc";
mychar.style.width="300px";
</script>
var mychar= document.getElementById("con");
mychar.style.color="red";
mychar.style.backgroundColor="#ccc";
mychar.style.width="300px";
</script>
2020-05-07
function openWindow(){
var mymessage=confirm("是否打開新窗口?");
if(mymessage==true)
{
window.open('http://idcbgp.cn','_blank','width=400,height=500,menubar=no,toolbar=no');
}
else
{
alert("啥子!");
}
}
var mymessage=confirm("是否打開新窗口?");
if(mymessage==true)
{
window.open('http://idcbgp.cn','_blank','width=400,height=500,menubar=no,toolbar=no');
}
else
{
alert("啥子!");
}
}