现在的位置: 首页 > 综合 > 正文

项目进行中的小问题-0419

2012年08月13日 ⁄ 综合 ⁄ 共 871字 ⁄ 字号 评论关闭

1、指定了404错误页面,却没有生效。

解决:要把Web.Config里相应的配置节点<customErrors mode="RemoteOnly" />中的mode属性修改为“on”,即

<customErrors mode="On">

  <error statusCode="404" redirect="~/default.aspx"/>

</customErrors>

 

2、easyUI中两种添加tabs的方法

  <div id="tabs" class="easyui-tabs" data-options="fit:true" >

    <div title="我的主页" style="padding:20px;" data-options="href:'/Home/MainPage'"></div>

  </div>

1)用iframe

  function addTab(title, url) {

    if ($('#tabs').tabs('exists', title)) {

      $('#tabs').tabs('select', title);

    }else{

      var content = '<iframe scrolling="auto" frameborder="0" src="' + url + '" style="width:100%; height:100%"></iframe>';

      $('#tabs').tabs('add', { title: title, content: content, closable: true }); 

     }

  }

2)不用iframe

  function addTab(title, url) {

    if ($('#tabs').tabs('exists', title)) {

      $('#tabs').tabs('select', title);

    }else{

      $('#tabs').tabs('add', { title: title, url: url, closable: true });

    }

  }

 

 

抱歉!评论已关闭.