- 浏览: 31147 次
- 性别:
- 来自: 上海
-
最新评论
文章列表
jquery get id val from callback
从数据库读出的带html标签的String字符串, Strusts1 标签解读
example:
String content = "<p>文章 内容</p>"
解读
<bean:write name='content' filter="false"/>
显示:
文章 内容
未解读显示:
<p>文章 内容</p>
$(document).ready(function(){
$("input[@type='text']").each(
function(){
$(this).keypress( function(e) {
var key = window.event ? e.keyCode : e.which;
if(key.toString() == "13"){
alert('Please click respec ...
js 表单验证
先加这几个,以后有时间再跟进
1、验证特殊字符
function stripscript(rs)
{
var pattern = new RegExp("[\|~`!@_-/?=';:[#\$%\^&\*\<\>\{\}()\+]");
var flg = pattern.test(rs);
if(flg){
return false;
}
return true;
}
2、验证数字
function isNumeric(strValue)
{
var re ...
怕忘记,所以就记在这里啦,都是些常用的
1、distinct 去重
2、order by user_id asc, startdate desc 连续两个字段排序
3、date(logintime) 把时间去掉,只留年月日
4、ADDDATE(regtime,30) 某时间的之后30天
5、sum(case filedname when 'value' then 'value' else 'value' end) as 'ch',
sum(case ex_type when 'math' then ex_value else 0 end) as 'math'
6、id not in (1,2) ...
使用$符号的技术,不只jquery一家,discuz的自己的技术也有使用$,为了解决此冲突,我们把jquery的$符号更新掉,方式如下
<script type="text/javascript">
jQuery.noConflict();//此句重要
jQuery(function () {
jQuery("#btn01").click(function(){
alert("成功解决冲突!");
});
</script>
解决ie6下png透明问题方案很多,在使用过程发现此方式最为便捷,
优势:
1、支持background-postion和repeat方法
2、在编写css样式时不用考虑浏览器问题,只要在引用css的页面里添加如下内容即可
把以下内容填加到<head></head>内
<!–[if IE 6]>
<script type="text/javascript" src="/script/DD_belatedPNG.js"></script>
<script>
DD_belate ...
iframe高度自适应
- 博客分类:
- web前端技术
iframe高度自应,方式有很多,先写一种吧,以后有机会再增加
<iframe frameborder="0" name="framename" width="100%" height="100%" src="1.html" scrolling="no"
frameborder="0" onload="this.height=framename.document.body.scrollHeight"></iframe ...