在此之前,我除了平时上网接触到网页和网站外几乎对网页和网站是一无所知的,连最基本的HTML我都不知道,甚至觉得CSS是个很复杂的东西。当我看到下面这段代码的时候,和看甲骨文(不是Oracell)什么区别:
<script type="text/javascript" language="javascript">
function appel(contsort)
{
if(document.getElementById(contsort).style.display=="none")
{
document.getElementById(contsort).style.display="block";
}
else
{
document.getElementById(contsort).style.display="none";
}
var sfEls = document.getElementById(contsort).getElementsByTagName("li");
for (var i=0; i<sfEls.length;i++)
{
sfEls[i].onmouseover=function()
{
this.className+=(this.className.length>0? " ": "") + "dispnone";
}
sfEls[i].onMouseDown=function()
{
this.className=this.className.replace(new RegExp("( ?|^)sfhover//b"),"");
}
sfEls[i].onMouseUp=function()
{
this.className+=(this.className.length>0? " ": "") + "dispnone";
}
sfEls[i].onmouseout=function()
{
this.className=this.className.replace(new RegExp("( ?|^)dispnone//b"),"");
}
}
}
function checkdel(msg)
{
if(confirm(msg))
return true;
else
return false;
}
function sAlert(str,type,classid,action)
{
var msgw,msgh,bordercolor;
msgw=400;//提示窗口的宽度
msgh=100;//提示窗口的高度
titleheight=25 //提示窗口标题高度
var sWidth,sHeight;
sWidth=document.body.clientWidth;
sHeight=document.body.clientHeight;
var bgObj=document.createElement("div");
bgObj.setAttribute('id','bgDiv');
bgObj.style.width=sWidth + "px";
bgObj.style.height=sHeight + "px";
document.body.appendChild(bgObj);
var msgObj=document.createElement("div")
msgObj.setAttribute("id","msgDiv");
msgObj.setAttribute("align","center");
msgObj.style.marginTop = -75+document.documentElement.scrollTop+"px";
msgObj.style.width = msgw + "px";
msgObj.style.height =msgh + "px";
var title=document.createElement("h4");
title.setAttribute("id","msgTitle");
title.setAttribute("align","right");
title.innerHTML="关闭";
title.onclick=function()
{
document.body.removeChild(bgObj);
document.getElementById("msgDiv").removeChild(title);
document.body.removeChild(msgObj);
}
document.body.appendChild(msgObj);
document.getElementById("msgDiv").appendChild(title);
var txt=document.createElement("p");
txt.style.margin="1em 0"
txt.setAttribute("id","msgTxt");
str = "<form action='"+action+"' method='post' name='mysort'>"+str;
str = str + "<br /><input type='submit' name='tijiao' value='提交' /> ";
str = str + "<input type='reset' value='重置' />";
str = str + "<input type='hidden' value='"+ type +"' name='type' />";
str = str + "<input type='hidden' value='"+ classid +"' name='classid' />";
str = str + "</form>";
txt.innerHTML=str;
document.getElementById("msgDiv").appendChild(txt);
if(type=="edit")
document.getElementById("Edit").value=classid;
}
</script>
对于连HTML都不了解的我,却不是从HTML开始学起的,上手使用的也不是写字板也不是Dreamweaver,而是开发动态网站的MS Route——SQL Sever2005+Visual Studio2005
不过VS集成环境功能也确实强大,起初了解如何从Ctrl+X 中拖控件到.aspx页面中去
记得把SQL数据库的连接和动态生成页面控件一起放在Page_Load事件里,HTML的标签和VS里的runat="sever"控件也是慢慢熟悉起来的。记得前几周一直在研究如何把数据库记录以表格方式动态显示在页面上,以及在页面中通过控件完成对数据库记录的查询、增、删、改。
对CSS的认识,是一样画瓢地知道了可以把
.tblhead
{
BACKGROUND-COLOR: #40364D;
COLOR:#F5D300;
FONT-SIZE:12px
}
这样的样式添加到某个TableRow、TableCell或者tr、td上的CssClass="tblhead "、class="tblhead "