Profile楚楚滴素材屋PhotosBlogLists Tools Help

Blog


    6/27/2005

    任意设置MSN Space空间首页显示的日志数目

    前些日子有网友问如何任意设置首页上网络日志的显示数目。MSN Space用下拉框提供了5,10,15,20这四个选择,这样看来似乎无法设置其他数字,但仔细一想,既然这是一个客户端的select对象,我们可以写一段代码来让浏览器执行,添加下拉框的中的数字值。这里我写了一段代码,是大家可以自定义1到99的首页显示的日志数。通过执行下面的一段代码,我将我自己的空间首页显示日志数修改成了8。执行下面的代码后,下拉框如下图所示

    javascript代码如下

    javascript:var e=document.getElementsByTagName("select");var i=0;for(;i<e.length;i++){if(e[i].name=="NumBlogs")break;}if(i<e.length){var ops=e[i].options;while(ops.length!=0){ops.remove(0);}for(i=1;i<100;i++){var op=new Option();op.text=""+i;op.value=""+i;ops.add(op);}}else{alert('error');}

    使用方法

    1. 参照以前的方法将上面这段代码加入到你的收藏夹中,使之成为一个“按钮”
    2. 在你Space的网络日志设置页面使用这个“按钮”,下拉框的选项就会自动更新成从1到99
    3. 选择一个数值,保存即可

    以上绿色部分引用自 Sanall Cobain's Memory, 感谢sanall的工作。

    (也可以直接复制到地址栏,回车运行)

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.
    Comments have been turned off on this page.

    Trackbacks

    The trackback URL for this entry is:
    http://sgcc.spaces.live.com/blog/cns!410F68280A9DE142!333.trak
    Weblogs that reference this entry
    • None