<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
    <style type="text/css">
.d1{
    background: green;
    color: red;
    padding: 15px;
    text-align: center;
}
.d2{
    border:2px solid orange;
    font-size: 30px;
    height: 50px;
}

</style>
</head>
<body>
     <h4 id="bt" class="bt cc">休息休息</h4>
     <a id="aid" href="http://www.baidu.com" target="_self" title="">百度</a>
    <input type="text" id="xh" class="xh" value="123456"><br>
    <input type="text" id="xm" class="xingm" value="熊二"></input><br>
    <input type="text" id="sxcj" class="sxcj" name="fs" value="60"></input><br>
    <input type="text" id="yycj" class="yycj" name="fs" value="70"></input><hr>
    <input type="button" value="单机" onclick="myfun1()">
    <input type="button" value="单机" onclick="myfun2()">
    <input type="button" value="单机" onclick="myfun3()">
  <input type="button" value="单机" onclick="myfun4()">
<script>
 var bb=document.getElementById('bt');
 var fs=document.getElementsByName('fs');
 var inp=document.getElementsByTagName('input');
 var a1=document.getElementById('aid');
// bt.innerHTML='学生信息<em>查询</em>';
// alert(fs[0].id);
// alert(fs[1].value);
// alert(fs[0].className);
function myfun1(){
    a1.innerHTML='163';
    a1.target='_blank';
    a1.href='http://www.163.com';
    a1.style.color='#00f';
}
function myfun2(){
    inp[0].value='88888';
    inp[1].value='gouxing';
    fs[0].value='90';
    fs[1].value='100';
    inp[0].style.background='red';
}
function myfun3(){
bb.style.textShadow='2px 3px 3px #ff0000';
bb.style.fontSize='40px';
bb.style.background='rgba(150,50,25,0.2)';
}

function myfun4(){
    bb.className='d1'+' '+'d2';
}
</script>   
</body>
</html>

html5dom2的更多相关文章

随机推荐

  1. @Resource注入为null

    UserController中userService为null只有一个原因, 那就是你所使用的UserController对象没有被IoC容器所管理,你使用的对象是自己new出来的, 而不由sprin ...

  2. Jmeter在非GUI环境下传递参数(命令行&Jenkins配置)

    https://www.cnblogs.com/kill0001000/p/8078686.html 通过cmd运行 jmeter -? 可以得到所有命令行选项(本文最后) 其中可以看到下面 -J 的 ...

  3. Kafka获取订阅某topic的所有consumer group【客户端版】

    之前写过如何用服务器端的API代码来获取订阅某topic的所有consumer group,参见这里.使用服务器端的API需要用到kafka.admin.AdminClient类,但是这个类在0.11 ...

  4. error: cannot lock ref 'refs/remotes/origin/master': unable to resolve reference 'refs/remotes/origin/master': reference broken...

    之前在自己的项目中添加了一个分支,然后做了一些操作,比如同步本地的分支情况到远程仓库中,然后在远程仓库中完成分支合并,以及 Pull request 等等操作,后来,在本地仓库中进行 git fetc ...

  5. maridb 10.3 主从复制,待机情况下从库 cpu 占用率高的处理方法

    发现两台从库,一直都在CPU 占用率 60% 90% 中浮动, 但是写库却很正常.搜了一大把没找到答案,把参数测试了一下得出以下结论 slave  my.cnf 添加如下参数 #只读模式 read_o ...

  6. How not to alienate your reviewers, aka writing a decent rebuttal?

    [forwarded from https://nebelwelt.net/blog/20180704-rebuttal.html] Assuming you have given everythin ...

  7. 扫描系统进程和获取某进程的PID

    扫描系统的所有进程 #include <stdio.h> #include <windows.h> #include <tlhelp32.h> int scan() ...

  8. 让height: 100%生效

    html: <body> <div class="box"></div> </body> css: .box{ position: ...

  9. sublime插件之px转rem

    sublime插件之px转rem   安装: 1.下载sublime并安装: 2.下载cssrem:https://github.com/hyb628/cssrem: 3.找到 Packages (首 ...

  10. js 时分秒与秒数的转换

    1. 时间戳 格式化为 时分秒(00:00:00) /** * 时间秒数格式化 * @param s 时间戳(单位:秒) * @returns {*} 格式化后的时分秒 */ var sec_to_t ...