多语言展示
当前在线:806今日阅读:44今日分享:28

layer标题修改;layer弹出框修改标题

layer是一个备受青睐的web弹层组件,layer弹出框的标题默认显示为:'信息',可以通过添加title属性设置弹出框的标题内容。代码:layer.open({ type: 2,   content: 'test.html',  title:'新增标题' })
方法/步骤
1

打开前端开发工具,新建一个html代码页面

2

找到页面上的标签,在<title>标签后面使用添加下载好的layer.css文件</p></div><div class="listcon"><span>3</span><p>在layer.css文件后面插入下载好的jquery.js、layer.js这两个外部文件(注:jquery.js要放在layer.js的前面)</p></div><div class="listcon"><span>4</span><p>创建弹出框。在layer.js引入文件后面创建一个新的<script>标签,然后在这个标签里面使用layer.open()创建弹出框功能。创建弹出框的代码layer.open({ type: 2,   content: 'test.html', })</p></div><div class="listcon"><span>5</span><p>查看弹出框效果。保存html代码文件后使用浏览器打开,这个时候看到弹出框已经功能已经实现,弹出框默认的标题显示为‘信息’</p></div><div class="listcon"><span>7</span><p>保存html代码后重新刷新浏览器页面,即可看到弹出框的标题已经修成功</p></div></div><div class="prev_next"> <div class="prev"> <span>上一篇:</span><a href="/cawnr.html">如何选出最满意的婚宴场地 告诉你五大技巧</a> </div> <div class="next"> <span>下一篇:</span><a href="/cawnt.html">怎么使用91剪报的修改笔记标题功能?</a> </div> </div> </div> <div class="appleccmw content-right"> <div class="listmore">推荐信息</div> <div class="send_list"> <ul> <li><a href="/cawns.html" title="layer标题修改;layer弹出框修改标题"><span>1</span><h3>layer标题修改;layer弹出框修改标题</h3></a></li> <li><a href="/izyk.html" title="宠物美容之泰迪毛发如何养?"><span>2</span><h3>宠物美容之泰迪毛发如何养?</h3></a></li> <li><a href="/izye.html" title="方便泰迪犬体型确认的方式"><span>3</span><h3>方便泰迪犬体型确认的方式</h3></a></li> <li><a href="/izyd.html" title="夏天到了爱犬泰迪为什么不能吹空调呢"><span>4</span><h3>夏天到了爱犬泰迪为什么不能吹空调呢</h3></a></li> <li><a href="/izyc.html" title="《挪威的森林》尤克里里谱-吉他谱TXT"><span>5</span><h3>《挪威的森林》尤克里里谱-吉他谱TXT</h3></a></li> <li><a href="/izyb.html" title="许巍旅行吉他谱,许巍旅行怎样弹唱"><span>6</span><h3>许巍旅行吉他谱,许巍旅行怎样弹唱</h3></a></li> <li><a href="/izxy.html" title="泰迪到底有多好色?看完这个你就懂了……"><span>7</span><h3>泰迪到底有多好色?看完这个你就懂了……</h3></a></li> <li><a href="/izxv.html" title="如何自学吉他(三)"><span>8</span><h3>如何自学吉他(三)</h3></a></li> </ul> <div class="clear"></div> </div> </div> </div> <div class="clear"></div> <div class="onjfeeds"></div><span class="onj_live"></span><span class="childonj"></span><div class="onj_location"></div><span class="buddhaonj"></span><div class="branchesccmw footer_service"> <a href="/sitemap.html" target="_blank">网站地图</a> <a href="/sitemap.xml" target="_blank">XML</a> <a href="/sitemap.txt" target="_blank">TXT</a> <a href="/rss.xml" target="_blank">RSS</a> <a href="/privacy.html" target="_blank">隐私政策</a> <a href="/service.html" target="_blank">服务条款</a> <a href="/agreement.html" target="_blank">使用条款</a> <div class="flagccmw footer_copyright clogWalletccmw">Copyright ©1996-2026 www.onijiang.com Corporation, All Rights Reserved</div> </div> <script src="/static/index1js/jquery-3.5.1.min.js" rel="external nofollow"></script> <script src="/static/js/share.js" rel="external nofollow"></script> <script src="/static/js/tran.js" rel="external nofollow"></script> <script src="/static/js/langs.js" rel="external nofollow" ></script> <div class="onj_happy"></div><span class="containeronj"></span><div class="baronj" id="baronj"></div><div id="Family_seal_onj"></div><script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https'){ bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else{ bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body> </html>