zoukankan      html  css  js  c++  java
  • JAVAScript的属性笔记

    JAVAScript代码的功能记录

    	定义HTML的样式:
    	定义宽度:
    	var width=document.getElementById('con').style.width='500px';
    	定义颜色样式
    	.style.color='red';
    	定义高度
    	.style.height='500px';
    	定义背景颜色,
    	.style.background='red';
    	
    	.style.display='none';隐藏某一块内容
    	.style.display='block';显示某一块内容
    
    	通过Id弹出对话框:
    	var cancel=document.getElementById('con');
    	cancel=confirm("确定要关闭取消吗?");
    	js直接写相关的代码,
    	document.write("很好,加油!");
    
    	通过某元素修改类名,重新定义新的样式。
    	p1.className='one';
    	
    	弹出输入信息的对话框,
    	score=prompt("请输入你的成绩!");
    
    	通过某元素打开一个window对话框,实行一个超链接。
    	var mywin=window.open("http://www.imooc.com",'width=300,height=600,menubar=no,toolbar=no,status=no,scrollbars=yes');
    	对打开连接的定义。
    'width=300,height=600,menubar=no,toolbar=no,status=no,scrollbars=yes'
    	关闭打开对话框的超链接。
    	mywin.close();
               定义一个属性,并给予子元素事件效果;
            $(".changelist").children().removeClass("list-1-o").addClass("list-2-v");
  • 相关阅读:
    BZOJ2530 : [Poi2011]Party
    BZOJ3998 : [TJOI2015]弦论
    BZOJ3941 : [Usaco2015 Feb]Fencing the Herd
    BZOJ3939 : [Usaco2015 Feb]Cow Hopscotch
    搬家啦~
    BZOJ3837 : [Pa2013]Filary
    使用Privoxy做智能代理切换
    放弃iOS4,拥抱iOS5
    让Xcode的 stack trace信息可读
    改进iOS客户端的升级提醒功能
  • 原文地址:https://www.cnblogs.com/xiuxiu123/p/5403603.html
Copyright © 2011-2022 走看看