為何這段代碼在360下不起作用?彈出個確認框后并未執行判斷語句
//定義"取消設置"的函數
var change=document.getElementById("txt");
function chback(){
var chsure=confirm("是否恢復原始值?");
if(chsure==true)
{
change.removeAttribute("style");
}
else
{
document.write("恢復不了!");
}
}
為何這段代碼在360下不起作用?彈出個確認框后并未執行判斷語句
//定義"取消設置"的函數
var change=document.getElementById("txt");
function chback(){
var chsure=confirm("是否恢復原始值?");
if(chsure==true)
{
change.removeAttribute("style");
}
else
{
document.write("恢復不了!");
}
}
2014-09-12
舉報
2014-09-12
兼容性問題吧,其他瀏覽器正常嗎?