function add(){
var p1 = document.getElementById("p1");
p1.className="one";
}
function modify(){
var p2 = document.getElementById("p2");
p2.className = "two";
}
var p1 = document.getElementById("p1");
p1.className="one";
}
function modify(){
var p2 = document.getElementById("p2");
p2.className = "two";
}
2019-01-04
function hidetext()
{
var mychar = document.getElementById("con");
mychar.style.display = "none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display = "block";
}
{
var mychar = document.getElementById("con");
mychar.style.display = "none";
}
function showtext()
{
var mychar = document.getElementById("con");
mychar.style.display = "block";
}
2019-01-04
var mychar= document.getElementById("con") ;
document.write("原标题:"+mychar.innerHTML+"<br>"); //输出原h2标签内容
mychar.innerHTML = "Hello world!";
document.write("修改后的标题:"+mychar.innerHTML); //输出修改后h2标签内容
document.write("原标题:"+mychar.innerHTML+"<br>"); //输出原h2标签内容
mychar.innerHTML = "Hello world!";
document.write("修改后的标题:"+mychar.innerHTML); //输出修改后h2标签内容
2019-01-04
function openWindow() {
var myClick = confirm("点击了按钮");
if(myClick==true) {
var url = prompt("确定打开网址",'http://www.imooc.com/')
if(url!=null) {
window.open(url,'_blank','width=400,height=0,menubar=no,toolbar=no');
}
}else {
alert("取消点击");
}
}
var myClick = confirm("点击了按钮");
if(myClick==true) {
var url = prompt("确定打开网址",'http://www.imooc.com/')
if(url!=null) {
window.open(url,'_blank','width=400,height=0,menubar=no,toolbar=no');
}
}else {
alert("取消点击");
}
}
function openWindow(){
var newWindow = confirm("是否打开新窗口?");
if(newWindow==true){
var uno = window.open('http://www.imooc.com/','_blank','width=400,height=500,menubar=no,toolbar=no');
}else{}
};
var newWindow = confirm("是否打开新窗口?");
if(newWindow==true){
var uno = window.open('http://www.imooc.com/','_blank','width=400,height=500,menubar=no,toolbar=no');
}else{}
};
var origninalContent = document.getElementById('con').innerHTML;
document.write('rusult:' + origninalContent + '<br>');
origninalContent = "Hello World";
document.write('resultChange:' + origninalContent);
document.write('rusult:' + origninalContent + '<br>');
origninalContent = "Hello World";
document.write('resultChange:' + origninalContent);
2019-01-01
之前学 html5 css3都觉得挺简单的 但是我觉得JSP好难啊,看代码就迷糊
2018-12-25