![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
js控制样式
qianxiaochi
这个作者很懒,什么都没留下…
展开
-
鼠标悬浮按钮变样式
$(function(){ $(":button[name=list_button]").attr("class","list_creat"); $(":button[name=list_button]").hover(function(){ $(this).attr("class","list_hover"); },funct原创 2010-01-16 09:47:00 · 1194 阅读 · 0 评论 -
40种网页常用小技巧(JavaScript)
1. oncontextmenu="window.event.returnValue=false" 将彻底屏蔽鼠标右键no 可用于Table2. 取消选取、防止复制3. onpaste="return false" 不准粘贴4. oncopy="return false;" oncut="return false;" 防止复制5. IE地址栏前换成自己的图标转载 2011-11-16 13:42:09 · 323 阅读 · 0 评论 -
计算整体高度
$(function(){ //计算高度 var BHeight = document.documentElement.clientHeight; $(".user_bk").css("height",BHeight-258); }) /*计算出整体页面的高度,减去相应的高度,付值给某一div; */原创 2010-05-26 16:04:00 · 283 阅读 · 0 评论 -
寻找iframe下的标签
.php页面,点一个链接,显示iframe里面的a标签,点另一个,显示b标签!原创 2010-07-19 14:25:00 · 531 阅读 · 0 评论 -
js控制td悬浮和点击时的样式
$(function(){ $("td[name=Tab]").attr("class","td_cros"); $("td[name=Tab]") .hover(function(){ $(this).addClass("td_crosH"); },function(){ $(this).re原创 2010-01-15 16:44:00 · 911 阅读 · 0 评论 -
点击前面的checkbox后面出现图片
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">新建页 jQuery(function($){ $(.sms_img).hide(); $(input.chk).click(function(){ var smsImg = $(this).parent(t原创 2010-03-17 17:15:00 · 1032 阅读 · 0 评论 -
text获得焦点出现悬浮层
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">http://www.w3.org/1999/xhtml">无标题文档body {font-size:12px;background:#B5DAFF;}.left,.right{behavior:url("image/iepngfix.htc");}#Layer1 {height:原创 2010-03-17 11:24:00 · 513 阅读 · 0 评论 -
用js算出页面高度和点击合并
/**页面js**/ $(function(){ //计算高度 var BHeight = $("body").height(); $("#flow_right,.flow_line").css("height",BHeight-49); //计算宽度 var BWidth = $("body").width(); var leftWidth = parseInt(BWidth*0原创 2010-01-23 16:01:00 · 872 阅读 · 0 评论 -
换行
function resizeLI(){ var h = $(".product_con").width(); var $lis = $(".product_con li"); var str = 0; $lis.each(function(i,dom){ var len = $(this).html().replace(//ig,"").length">//["tbnr]|[原创 2010-01-23 16:18:00 · 310 阅读 · 0 评论 -
css截取长度
.name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis; margin:0 0 0 60px;}.name{width:400px;}原创 2010-01-16 09:45:00 · 306 阅读 · 0 评论 -
iframe自适应高度
ie6下好用,谷歌标准浏览器不好用!方法二/jsp/admin/main.jsp" width="760px" height="1500px" name="iframeA" scrolling="no" id="firameID" frameborder="0" >js部分:function SetCwinHeight(){ var bobo=document.ge转载 2010-08-05 12:53:00 · 818 阅读 · 1 评论