近期

2018-09-30  本文已影响0人  深度_1175

select option如果里面不写value值,默认提交<option></option>中间的值

//单行溢出
style="width:130px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;"

width:宽度自己定义;可长可短

count = count(res);
temp = []; for(i = 0; i <count-1; $i++)
{

  
  for($j =0; $j < $count -1 - $i; $j++)
    {


       if($arr[$j] > $arr[$j+1])
        {
            $temp        = $arr[$j];
            $arr[$j]     = $arr[$j+1];
            $arr[$j+1]   = $temp;
       }

}

}

created ecchart 渲染有问题,要在外部
ecchart不接受关联数组

多行限制(span)

不跨域时
访问iframe: contentWindow
访问父级:parent
访问顶级:top

white-space:nowrap;

========================
组件中的ref(获取组件对象)
组件中的v-model 和 emit (有自动触发现象)

overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;

overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap

=====================================================
点击a标签,跳转到iframe中,并在iframe中显示指定的页面

点击a标签,跳转到iframe中,并在iframe中显示指定的页面

1、用a标签的target属性

<iframe id="myFrameId" name="myFrameName" scrolling="no" frameborder="0"></iframe>
  <a href="../XX.action?codeInfo=Demo123" target="myFrameName" >跳转</a>

上面a标签的target指向的是name为myFrameName的iframe,不是用Id来做指向的目标,如果target=“myFrameId”的话只有新版的Chrome、opera支持,在IE10,FF中都不生效。

2、跳转是用a标签的href传递参数,在含有iframe页面中用jquery接收判断传递过来的参数,然后获取iframe的id,根据参数设置iframe的src,显示指定的页面。

在HTML中,

<li id=“level1”><a href=“javascript:void(0);” onclick="method()">点击</a>

在js的method()函数中,

var subhref = "";
if(event.data.url.indexOf("action")>=0){//获取当前页面的URL,URL为action形式
  subhref = event.data.url+"?projectId="+event.data.projectId+event.data.param;
}else{//URL为jsp形式
  subhref = event.data.url;
}
$("#main").attr("src", subhref);//根据id设置iframe的src,跳转到相应的iframe,即进行iframe局部刷新

上一篇 下一篇

猜你喜欢

热点阅读