首页 > 其他分享 >用freemarker生成静态页面

用freemarker生成静态页面

时间:2022-12-29 17:02:56浏览次数:32  
标签:style freemarker title 静态 list div left margin 页面


FreeMarker是一个模板引擎,一个基于模板生成文本输出的通用工具,使用纯Java编写
    FreeMarker被设计用来生成HTML Web页面,特别是基于MVC模式的应用程序
虽然FreeMarker具有一些编程的能力,但通常由Java程序准备要显示的数据,由FreeMarker生成页面,通过模板显示准备的数据.

public   void  createFtl(Map < String, Object >  req)

{

        try 

{

            Configuration cfg = new Configuration();


            // - Templates are stoted in the WEB-INF/templates directory of the

            // Web app.

            String tempate = FileConstent.PrePath + "/tempates/";

            String destPath = tempate +"index/www.bt285.cn_index.html";

            String destPathSpider = tempate +"index/www.bt285.cn_index_spider.html";

           // new File(destPath).deleteOnExit();

           // new File(destPathSpider).deleteOnExit();

            cfg.setDirectoryForTemplateLoading(new File(tempate));

            Template tIndex = getTemplate(cfg,

                    "index/http://www.bt285.cn_index.ftl",Locale.ENGLISH,Constent.DefaultEncodIng);

            Template tIndexSpider = getTemplate(cfg,

                    "index/http://www.bt285.cn_index_spider.ftl",Locale.ENGLISH,Constent.DefaultEncodIng);        

            doWirte(tIndex,destPath,req);

            doWirte(tIndexSpider,destPathSpider,req);

        } catch (Exception e) 

{

            e.printStackTrace();

        }

    }


    

public   void  doWirte(Template t,String path,Map < String, Object >  req)

{

        try 

{

             //BufferedOutputStream bw = null;

            // FileOutputStream outStream = new FileOutputStream(path);

             //BufferedWriter out = new BufferedWriter(new OutputStreamWriter(outStream,Constent.DefaultEncodIng));

             BufferedWriter out = new BufferedWriter(new FileWriter(path));

            // Merge the data-model and the template

            t.setEncoding(Constent.DefaultEncodIng);

            t.process(req,out);

        } catch (Exception e) 

{

            e.printStackTrace();

        }

        

    }


    

private  WNewsDAO < WNews >  newsDAO;


    

private  WCommentsDAO commentsDAO;

    

    

public   static  Template getTemplate(Configuration cfg,String name,Locale locale,String decode)

            

throws  IOException

{

        return cfg.getTemplate(name);

    }

 



<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"

>

< HTML  dir =ltr  xml:lang ="zh-CN"  

xmlns ="http://www.w3.org/1999/xhtml"

>

< head >

< meta  http-equiv ="Content-Type"  content ="text/html; charset=UTF-8"   />

< link  media =screen  href ="/js/application.css"  type =text/css  rel =Stylesheet >

< link  media =screen  href ="/js/default.css"  type =text/css  rel =Stylesheet >

< title > BT下载|BT电影|BT软件|BT285.cn </ title >

< meta  name ="keywords"  content ="BT下载|BT电影|BT软件|BT285.cn"   />

< meta  name ="description"  content ="BT285.cn 为大家网友提供BT下载,BT电影还有BT软件,BT联盟等一系列BT服务."   />

< meta  name ="robots"  content ="all"   />

< meta  http-equiv ="cache-control"  content ="no-cache" >

< meta  http-equiv ="pragma"  content ="no-cache" >  

< meta  http-equiv ="expires"  content ="0" >  

</ head >

   <

body >

   <

div  class ="wrapper" >


     <

div  class ="header" >

          <

#include  "../head/www.bt285.cn_head.html" >

         <

form  action ="http://www.baidu.com/baidu"  target ="_blank" >

             <

table  bgcolor ="#FFFFFF" >< tr >< td >

             <

input  name =tn  type =hidden  value =baidu >

             <

a  href ="http://www.baidu.com/" >< img  src ="http://img.baidu.com/img/logo-80px.gif"  alt ="Baidu"  align ="bottom"  border ="0" ></ a >

             <

input  type =text  name =word  size =30 >

             <

input  type ="submit"  value ="百度搜索" >

             </

td ></ tr ></ table >

         </

form >

     </

div >  

     <

div  class ="outer" >

         <

div  class ="inner" >


             <

div  class ="left" >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/yazhou"  style ="color:black;font-size: 13pt;text-decoration: none;" > 亚洲BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/btjinglin"  style ="color:black;font-size: 13pt;text-decoration: none;" > bt精灵下载 </ a ></ h2 ></ font >

                           </

div >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/tibetisxizang"  style ="color:black;font-size: 13pt;text-decoration: none;" > 西藏(tibetisxizang)专题 </ a ></ h2 ></ font >

                           </

div >

                            <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/dapian"  style ="color:black;font-size: 13pt;text-decoration: none;" > 大片BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list77 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                     <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/war"  style ="color:black;font-size: 13pt;text-decoration: none;" > 战争片BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list83 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                     <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/other"  style ="color:black;font-size: 13pt;text-decoration: none;" > 欧美BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list76 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                     <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/sci"  style ="color:black;font-size: 13pt;text-decoration: none;" > 科幻片BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list81 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/quyi"  style ="color:black;font-size: 13pt;text-decoration: none;" > 曲艺BT下载 </ a ></ h2 ></ font >

                           </

div >

                          <

#list  list91 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                        <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/other"  style ="color:black;font-size: 13pt;text-decoration: none;" > 欧美BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list10 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                        <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/other"  style ="color:black;font-size: 13pt;text-decoration: none;" > 欧美BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list11 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                        <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/other"  style ="color:black;font-size: 13pt;text-decoration: none;" > 欧美BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list12 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >


             </

div > <!-- end left -->


             <

div  class ="center" >

                     <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/sitcom"  style ="color:black;font-size: 13pt;text-decoration: none;" > 连续剧BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list85 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/art"  style ="color:black;font-size: 13pt;text-decoration: none;" > 文艺片BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list82 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/fear"  style ="color:black;font-size: 13pt;text-decoration: none;" > 恐怖片BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list84 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/zhongyi"  style ="color:black;font-size: 13pt;text-decoration: none;" > 综艺BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list87 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/pingshu"  style ="color:black;font-size: 13pt;text-decoration: none;" > 评书BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list92 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/other"  style ="color:black;font-size: 13pt;text-decoration: none;" > 其他BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list69 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/other"  style ="color:black;font-size: 13pt;text-decoration: none;" > 其他BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list90 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/other"  style ="color:black;font-size: 13pt;text-decoration: none;" > 其他BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list95 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

             </

div > <!-- end middle -->


             <

div  class ="right" >

                     <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/movie"  style ="color:black;font-size: 13pt;text-decoration: none;" > 影视BT下载 </ a ></ h2 ></ font >

                           </

div >

                          <

#list  list75 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/love"  style ="color:black;font-size: 13pt;text-decoration: none;" > 爱情片BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list80 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/jap"  style ="color:black;font-size: 13pt;text-decoration: none;" > 日剧BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list86 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/sport"  style ="color:black;font-size: 13pt;text-decoration: none;" > 体育BT下载 </ a ></ h2 ></ font >

                           </

div >

                          <

#list  list89 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                       <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/xiangsheng"  style ="color:black;font-size: 13pt;text-decoration: none;" > 相声BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list93 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/other"  style ="color:black;font-size: 13pt;text-decoration: none;" > 其他BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list96 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/other"  style ="color:black;font-size: 13pt;text-decoration: none;" > 其他BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list97 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

                      <

div  style ="margin-left:3px; border: 2px solid #CCDEaF; background:#FaFaFa;" >

                           <

div  style ="margin-left:60px;" >< font  size =+1 >< h2 >< a  href ="http://www.bt285.cn/other"  style ="color:black;font-size: 13pt;text-decoration: none;" > 其他BT下载 </ a ></ h2 ></ font >

                           </

div >

                           <

#list  list99 as p >

                                 <

div >

                                     <

span  class ="index-title-word" >

                                             <

a  href ="http://www.bt285.cn/content.php?id=${p.strId}"  target ="_blank"  title ="${p.title}" > ${p.title} </ a >

                                     </

span >

                                 </

div >

                           </

#list >

                      </

div >

             </

div > <!-- end rigth -->


             <

div  class ="clear" ></ div >  


         </

div >

     </

div >

    


      <

div  id =footer 

         style

="BORDER-TOP: #47749e 2px solid; MaRGIN-TOP: 10px; COLOR: #006699; PaDDING-TOP: 5px; TEXT-aLIGN: center" >

         <

div  style ="MaRGIN-TOP: 5px" >

          <

#include  "../link/www.bt285.cn_link.html" >

          <

#include  "../foot/www.bt285.cn_foot.html" >

         </

div >


</ div >

</ body >

 

</ html >

标签:style,freemarker,title,静态,list,div,left,margin,页面
From: https://blog.51cto.com/u_15907570/5978525

相关文章

  • C++数据结构03--静态链式线性表的实现
    头文件://静态链表头文件#include"stdafx.h"usingnamespacestd;#defineMAXSIZE250typedefintElemType;typedefstruct{ElemTypedata;intcur;//存在next的指针......
  • freemarker中contains和seq_contains详解
    freemarker中contains和seq_contains详解于2018-06-2615:16:06发布freemarkerfreemarker中seq_contains和containscontains用于查找字符串是否存在某个子字符......
  • ModStart 关于禁用后台页面多 TAB 显示的方法
    在最新的版本迭代过程中,系统默认开启了后台页面多标签打开支持。多页面标签其显示原理是将多个页面放置于iframe进行逻辑隔离。由于部分模块暂未完全支持,可通过如下方式临......
  • 同一页面两个form表单内可以有相同name和id的input吗
    JQuery项目中同一个页面有修改、添加两个子DIV,分别包含两个Form表单,所以不可避免的需要复用name和id,测试后发现:可以把ID给改了,同一张页面中不要出现多个相同ID,其它的input......
  • 在手机页面上显示table方案研究
     资料地址:https://elvery.net/demo/responsive-tables/ 第一种方案:当屏幕宽度小于一个值时,将不重要的列隐藏掉; 第二种方案:固定第一个列,其他列可以拉动展示 第三种方案......
  • vue项目中使用histroy代替hash(兼容刷新后页面丢失)
    1、在node.js解决node中安装插件connect-history-api-fallbacknpminstall--saveconnect-history-api-fallbackvarhistory=require('connect-history-api-fallb......
  • 04-前端技术_CSS与CSS3美化页面
    目录​​二,CSS与CSS3美化页面​​​​1,CSS简介​​​​1.1 什么是CSS?​​​​1.2 样式层叠次序​​​​2,CSS基础语法​​​​2.1介绍​​​​2.2注释​​​​3,CSS使用......
  • 静态页面使用高德地图
    首先官网申请key和密钥引入高德地图js  js中初始化地图 具体的操作可查看官网https://lbs.amap.com/demo/jsapi-v2/example/event/event-state......
  • VUE-vue中切换页面时让目标页面的滚动条自动滚动到顶部的方法
    情景描述页面/a,有输入框,当输入框输入合适的值的时候,不隐藏软键盘,点击相应按钮直接跳到/b页面 /b,页面本来内容很少,没有滚动条的,可是莫名的被下方的灰色......
  • centos7修改静态ip,主机名,主机映射
    centos7配置一.修改主机名​​root用户操作​​vim/etc/hostnamehadoop201#添加要设置的主机名​​重启虚拟机生效​​二.添加ip和hostname对应关系即主机映射vim/e......