1.如何在页面加载后,再自动调用某function
放在body的onLoad里面
2.console.log(),打印信息
3.<input readOnly>不可编辑,border:0px;padding:0px;没有光标,没有边界,style="background-color:Transparent"透明
4.给一个input text赋值,document.getElementById().value= ""
5.div 的背景图自动加滚动条 style="overflow:auto"
6.链接怎么去掉下划线,style="text-decoration:none"
7.div中底部对齐,position:absolute;bottom:;
8.动态添加,并有事件(wifi)
function loadSsid(){
var addDiv = document.getElementById('ssidList');
for(var j =0; j < ssidarray.length; j ++){
var br = document.createElement("br");
addDiv.appendChild(br);
var fileObj = document.createElement("input");
fileObj.setAttribute('id',ssidarray[j].ssid);
fileObj.setAttribute('value',ssidarray[j].ssid);
fileObj.setAttribute('type',"text");
fileObj.setAttribute('style'," background-color:Transparent;padding:0px;border:0px");
fileObj.setAttribute('class',"t9");
if(fileObj.addEventListener)
{
fileObj.addEventListener('click',editSsid);
}
else if(fileObj.attachEvent)
{
fileObj.attachEvent('onclick',editSsid);
}
addDiv.appendChild(fileObj);
var tr = document.createElement("tr");
addDiv.appendChild(tr);
}
}
function editSsid(e){
var cc = e.srcElement ? e.srcElement : e.target;
ssid = cc.value;
m=0;
while(m<ssidarray.length){
if(ssidarray[m].ssid == ssid){
password = ssidarray[m].password;
break;
}else{
m++;
}
}
//alert(cc.tagName);
//alert(cc.value);
document.getElementById('ssidList').style.display='none';
document.getElementById('editSsid').style.display='block';
document.getElementById('addNet').style.display='none';
document.getElementById('dsbNet').style.display='block';
document.getElementById('deletebutton').style.display='block';
document.getElementById('onessid').value=ssid;
if(password != "null"){
document.getElementById('onepassword').value=password;
}else{
document.getElementById('onepassword').value="";
}
}