m1net.cn's profilem1net ™PhotosBlogLists Tools Help
    26/10/2005

    脚本系列之六(插入图片)

     

     

    我们编辑日志时经常需要使用图片,本脚本将方便您进行图片的编辑。

    该脚本支持对插入图片进行替换文字(图片加载前和鼠标停留时显示的文字)、对齐方式、边框宽度的设置、水平间隔、垂直间隔的设置。

    注意:图片来源要设置为http格式的全路径地址,“浏览”按钮选择本地地址将无法正确显示图片。

     

     

    使用方法如下:

    javascript:document.all("rtebox").getElementsByTagName("div")[2].focus();void(document.selection.createRange().execCommand("InsertImage", true));

    【方法一】

    进入日志编辑的设计状态下(非HTML状态),将上面的脚本代码复制到地址栏,回车即可。

    【方法二】

    将该脚本一次性地收藏到收藏夹,以后只要进入日志编辑的设计状态下(非HTML状态),单击收藏夹该链接即可。

    加入到收藏夹的方法:

    1 打开IE,不考虑是什么页面,将当前页面加入到收藏夹,名称自己任意起,比如"InsertImage"。

    2 复制上面的脚本代码。

    3 在收藏夹中刚才收藏的那个链接上单击鼠标右键,选择"属性",弹出新窗口,将脚本粘贴到"URL"后面的文本框中,单击"确定"按钮,会出现询问你"是否保留这一目标"的对话框,选择"是"即可。

     

    【注意】本脚本在IE6.0下运行测试通过,在其他浏览器上不能保证正常运行。

     

     

     

    感谢 爬山虎 提供

    Comments (15)

    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.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Grapelalawrote:
    为什么回车以后显示“无效的URL'的窗口呢?
    15 Jan.
    谢谢,真的很好用!!
    27 June
    落叶飘香wrote:
    好啊啊、
    24 May
    Picture of Anonymous
    julialove0521 wrote:
    我的问题和他们一样啊,为什么显示不出来图片啊,全路径地址是什么意思啊??谢谢
    13 Jan.
    Picture of Anonymous
    悠悠驿站 wrote:
    学会了,太感谢了!
    12 Jan.
    Picture of Anonymous
    Ada wrote:
    注意:图片来源要设置为http格式的全路径地址,“浏览”按钮选择本地地址将无法正确显示图片
    怎么才能设置成http的全路径地址呢? 谢谢版主!
    15 Dec.
    Picture of Anonymous
    Ada爱是种经历破碎了也美丽1 wrote:
    版主 我也按照你教的方法做的,可是我预览的时候为什么没显示照片呢
    15 Dec.
    Picture of Anonymous
    Yicky6 wrote:
    完全感谢
    11 Dec.
    Picture of Anonymous
    爆爆蓝lu wrote:
    恩~~~真是太感谢拉~~~~偶像偶像~~~~~~~~呵呵~~~
    30 Nov.
    Picture of Anonymous
    月之影---影之海 wrote:
    真棒,不过动感图片怎么发上去?
    29 Nov.
    Picture of Anonymous
    cnzoel wrote:
    學會了~!!謝謝指教~~!!
    28 Nov.
    Picture of Anonymous
    PLICAN0512 wrote:
    图片来源要设置为http格式的全路径地址,“浏览”按钮选择本地地址将无法正确显示图片。

    请问http格式地址怎么设置哦.比如说我的本地浏览地址是E:\pictures\together.jpg,那我的http地址就是?我的spceqk 加 E:\pictures\together.jpg是吗?

    谢谢.
    27 Nov.
    Picture of Anonymous
    EvilYaya wrote:
    thank you so much!!
    10 Nov.
    Picture of Anonymous
    天使凡尘 wrote:
    喜欢~~呵呵
    31 Oct.
    Picture of Anonymous
    zdhsh1 wrote:
    谢谢!!!
    29 Oct.

    Trackbacks (1)

    The trackback URL for this entry is:
    http://m1net.spaces.live.com/blog/cns!B5C2D0CE61E22862!28698.trak
    Weblogs that reference this entry