kindsoft配置小记
昨天在帮同事配置ASP程序后台的时候,上传有问题,后来看了下是少了文件,kindsoft默认是用的PHP上传处理的。
考虑到如果ASP的空间不支持PHP,所以百度了下ASP配置教程,开始找的是百度文库的不成功,后来找了个.NET的配置的可以了。
废话不多说上代码

var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name="body]', {
uploadJson: '../kindeditor/asp/upload_json.asp',
fileManagerJson: '../kindeditor/asp/file_manager_json.asp',
allowFileManager : true
});
});

开始这个allowFileManager : true放在最上面,发现不行,如上配置是没有问题的!

好快,又到了过生日的时候了!
2013年生日 />
[player loop="1" autoplay="1"]
https://music.163.com/#/song?id=1770452310

直接上代码:

<!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" />
<title>IE6 fixed</title>
<style type="text/css">
*
{
margin: 0px;
padding: 0px;
}
body {
_background-image: url(about:blank); /*用浏览器空白页面作为背景*/
_background-attachment: fixed; /* prevent screen flash in IE6 确保滚动条滚动时,元素不闪动*/
}#topNav {
width: 980px;
z-index: 100; /*设置浮动层次*/
overflow: visible;
position: fixed;
top: 50px; /* 其他浏览器下定位,在这里可设置坐标*/
_position: absolute; /*IE6 用absolute模拟fixed*/
_top: expression(documentElement.scrollTop + 50 + "px"); /*IE6 动态设置top位置*/
/* documentElement.scrollTop 设置浮动元素始终在浏览器最顶,可以加一个数值达到排版效果 */
background-color:#0000FF;
height: 31px;
}
.show{
position:absolute;
top:500px;
left:400px;
border:#ff0000 1px solid;
}
</style>
</head>
<body>
<div class="jd_menu" id="topNav">1111</div>
<div style="height:2000px"></div>
<div class="show">show</div>
<p>
利用给<body>设置固定的背景,防止滚动条滚动时的闪动;如果<body>中要设置滚动的背景而产生冲突,可以把代码写在html选择器里面,如:
html {
_background-image: url(about:blank);
_background-attachment: fixed; /* prevent screen flash in IE6 */
}
body {
background-image: url(1.jpg);
background-attachment: scroll;
}
</p>
</body>
</html>

来源jb51

<a onclick="SetHome(window.location)" href="javascript:void(0)">设为首页</a> | <a onclick="AddFavorite(window.location,document.title)" href="javascript:void(0)">加入收藏</a>
<script type="text/javascript" language="javascript">// <![CDATA[
    //加入收藏
    function AddFavorite(sURL, sTitle) {
            sURL = encodeURI(sURL); 
        try {   
            window.external.addFavorite(sURL, sTitle);   
        } catch(e) {   
            try{   
                window.sidebar.addPanel(sTitle, sURL, "");   
            } catch (e) {   
                alert("加入收藏失败,请使用Ctrl+D进行添加,或手动在浏览器里进行设置.");
            }   
        }
    }

    //设为首页
    function SetHome(url){
        if (document.all) {
            document.body.style.behavior='url(#default#homepage)';
               document.body.setHomePage(url);
        } else {
            alert("您好,您的浏览器不支持自动设置页面为首页功能,请您手动在浏览器里设置该页面为首页!");
        }
    }
// ]]></script>

昨天在群里面,有人有个问题,就是iframe高度要是100%,想到了直接写高度100%。后来我想到了一个解决的办法,给那人提醒了,结果他写出来了,我还不知道怎么写。
思路是这样的,先获取屏幕的高度,然后改变iframe的高度。
废话不多说了,直接代码

<iframe id="userSrc" name="userSrc" src="" width="100%"  marginheight="0" onLoad="iFrameHeight()"; marginwidth="0" frameborder="0"></iframe>
<script type="text/javascript" language="javascript">
var fra = frames["userSrc"];var url = "http://123.126.51.201/";if(url)fra.location = url;
function iFrameHeight(){
	var ifm= document.getElementById("userSrc");
	var pheight=window.screen.height;
	ifm.height = pheight;
	}
</script>