Loading

邢栋博客

“前端笔记“

不使用submit按钮来提交表单

<script language="javascript"> function gosubmit(){ document.myfrom.submit(); } </script> <form name="myfrom" method="post" action="post.php"> <input type="text" name="username" /> <span onclick="gosubmit()">提交</sp...

chrome谷歌浏览器下input内text不垂直居中解决办法

加入样式 input { font:16px "Microsoft YaHei", arial; /font:16px arial;/ height:35px; line-height:35px\9; _line-height:36px; width:300px;; padding-left:4px; border:1px solid #ccc; }

网页中css去除滚动条

<body scroll="no">

网站后台ifarme下session失效后点击跳转到登陆页

<script type="text/javascript"> MyIndex = '{:U(MODULE_NAME."/Login/index")}';//为跳转链接 if (top.location != self.location){ top.location = MyIndex; } </script>

js获取图片的宽度和高度

1.onload // 图片地址 后面加时间戳是为了避免缓存 var img_url = 'http://www.xingdong365.com/content/uploadfile/201308/3b3e1376105614.jpg?'+Date.parse(new Date()); // 创建对象 var img = new Image(); // 改变图片的src img.src = img_url; // 加载完成执行 img.onload = function(){ // 打印 alert('width:'+i...

select标签样式美化

js部分 <script type="text/javascript"> var childCreate=false; function Offset(e) //取标签的绝对位置 { var t = e.offsetTop; var l = e.offsetLeft; var w = e.offsetWidth; var h = e.offsetHeight-2; while(e=e.offsetParent) {...

css实现背景透明,文字不透明

background:rgba(255, 255, 255, 0.5) none repeat scroll 0 0 !important; filter:Alpha(opacity=50); background:#fff;/ 给区域内的字div标签加上position:relative 才能实现文字不透明

textarea 在浏览器中固定大小和禁止拖动

给textarea 加个样式 (这个方法直接) resize: none;

禁止网页复制的代码

禁止网页复制的代码 <script type="text/javascript"> <!-- document.oncontextmenu=new Function('event.returnValue=false;'); document.onselectstart=new Function('event.returnValue=false;'); --> </script>

div布局,如何使左侧div高度与右侧的div高度自适应相同

方法1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <tit...