JS XML

XMLXML : 可扩展的文本标记语言 Extensible Markup Language 整个文是一个文档节点每个XML标签是一个元素节点包括在xml元素中的文本是文本节点每一个xml属性是一个属性节点注释属于节点 e.g.<?xml version='1.0' encoding='utf-8'?> <movies> <movie> ...

Read more

JS form元素值的操作

<input type="text" name="username" value="this is a test"><br> 性别: <input type="radio" name="sex" value="1" checked>男 <input type="radio" name="sex" value="0" >女<br> ...

Read more

JS 元素的基本操作

div{ width:200px;height:200px;background:orange } .active{ border:solid 10px #ddd; background:black; } <div title='test' style="" onmouseout="this.style.background = 'orange'"> ...

Read more

JS 节点相关操作

<style> #content { width:800px; height:500px; border:solid 1px #ddd; margin: 0 auto; } .item { width:100px; height:100px; ...

Read more

JS DOM

DOM简介HTML文档中的每个元素都是一个节点无论是标签 标签属性 文本 注释甚至空白都算是一个节点 查找元素 通用方法 document.getElementById 通过id属性来查找元素document.getElementsByTagName 通过标签名来查找元素document.getElementsByClassName 通过类名来查找元素document.getEleme...

Read more

JS 抽奖

<style> #abc { width:300px; height:200px; margin: 0 auto; border:solid 1px #ddd; text-align:center; font-size:30px; line-height:200px;...

Read more

JS scrollTo scrollBy

scrollTo scrollBy#c { width:100px; height:50px; background:#eaf; position:fixed; right:0px; top:100px; } <div style="width:200px;margin:0 auto;height:auto;background:-moz-li...

Read more