三天的页面开发

三天的页面开发

    上周五开始一项开发工作,将树形的数据结构放到关系型数据库,并提供页面进行数据的维护,遇到的问题:1、需求不清晰;2、表结构不清晰;3;前端开发技术非常不熟悉;
    结果就是开发缓慢,系统交互效果差,做出来的页面自己都不满意,开发慢导致上线压力大,心里压力也大,很严重的加班。。。。。。。
    总结下用到的页面技术:1、CSS+DIV样式定义的两种写法(.divforcheck{ width:500px; height:300px; background-color:#f00; color:#fff; }
                                                                                <div  style="border: 1px dotted black;background-color:#FFFFFF;width:500px ">)
                                   2、JS:动态的添加页面元素var tab =document.getElementById("guanlian");
                                                                             var newRow = tab.insertRow(0);//添加了一行
                                                                             var newTd1        = newRow.insertCell(0);
                                                                              var newTdName     = newRow.insertCell(1);   ;
                                              判断为空function isEmpty(s) { return ((s == undefined || s == null || s == "") ? true : false); }
                                              弹出选择框:if(confirm("您修改了关联词,请确定在提交前进行了验证")){
                                                                                 document.form1.event_submit_do_add.value="submit";
                                                                                  document.form1.submit();}
                                              Ajax交互:
var  callback  = {
                    success:
function(o) {
                        
var result = o.responseText;
                        document.getElementById('chk_thesaurus').style.display
="";
                        document.getElementById('chk_thesaurus').innerHTML
=result;
                        document.getElementById('chk_thesaurus').display 
= "block";
                    }
,
                    failure: 
function(o) {
                        alert(
"验证请求,链接服务器失败!");
                    }

                }

                ;
                
var  sUrl  =  'ajax / checkThesaurus.htm ? relName = ' + encodeURIComponent(encodeURIComponent(title));
                YAHOO.util.Connect.asyncRequest('GET',sUrl,callback);

                                                    服务器段java代码两种写法:1、在反馈ajax请求的页面中填写符合HTML标准的反馈InnerHTML
                                                                                         2、通过        
rundata.getResponse().getWriter().print("var ajaxRequestData_bizType = "+JSONObject.fromObject(tree).toString());

 context.put("result", net.sf.json.JSONArray.fromObject(tree).toString());(打成JSON串)


                          3、表单提交处理(JS提交表单)document.form1.event_submit_do_add_treeWordProperty.value="submit";
                                                                       document.form1.submit();    
java代码的Exception控制、异常处理             
    

你可能感兴趣的:(三天的页面开发)