//拿到body,操作其中的內容
// var body=document.body;
// 獲取當前節點下的所有子節點
// console.log(body.childNodes);
// 獲取標簽的第一個和最后一個節點
// console.log(body.firstChild);
// console.log(body.lastChild);
// 獲取根節點
// console.log(body.ownerDocument);
// 父節點
// console.log(body.parentNode);
// console.log(body.parentElement);
// 前/后一個同級節點
// console.log(body.previousSibling);
// console.log(body.nextSibling);
// 創建一個新標簽
// var img=document.createElement('img');
// 把標簽拼接進文檔流
// var div=document.getElementById('div1');
// 把子標簽拼接進副標簽
// div.appendChild(img);
// 給img標簽設置src屬性
// img.setAttribute('src','img5.jpg');
// 創建一個p標簽,設置文字,并把該標簽拼接在p3之前
// 1.創建p標簽
// var p=document.createElement('p');
// 2,設置p標簽
// p.innerHTML='我是插班';
// 3。把p標簽拼接進文檔
// div.insertBefore(p,document.getElementById('p3'));
// 替換節點
// div.replaceChild(p,document.getElementById('p3'));
// 移除節點
// 刪除div中p1標簽
//div.removeChild(document.getElementById('p1'));
// document.getElementById('p1').remove();
var str='skldfjalk';
var regExp='a';
alert(str.search(regExp));
// e.preventDefault()//取消默認事件
// return false;
//css中透明的屬性opacity
$('form')[0].reset();//提交完數據以后清空里面的內容