zoukankan      html  css  js  c++  java
  • ArcGIS Server 9.3 中动态改变Toolbar上的工具的提示

    //主要通过改变工具栏上工具对应的图片的标题来实现(测试通过改变它的toolTip,但是未成功)

    var mapprintdiv = document.getElementById("PrintMapDiv");
        var toolbarobj = $find("Toolbar1");
        var toolbar = (toolbarobj != null) ? Toolbars[toolbarobj._uniqueID] : null;
        var toolbarItemName = "PrintMap";
        var imageTag = "Toolbar1PrintMapImage"; //这个的名称的规则是"Toolbar1"+toolbarItemName+"Image"
        var img = document.images[imageTag];
        if (mapprintdiv.style.visibility == "hidden") {
            mapprintdiv.style.top = 50;
            mapprintdiv.style.left = 50;
            mapprintdiv.style.visibility = "visible";

            if (toolbar != null) {   //改变工具的提示
                img.alt = "关闭地图打印";
                img.title = "关闭地图打印";
                switchImageSourceAndAlphaBlend(img, toolbar.items[toolbarItemName].defaultImage);  //这个应该是esri封装的js函数
            }
           
        }
        else {
            mapprintdiv.style.visibility = "hidden";
            if (toolbar != null) {//改变工具的提示

                img.alt = "地图打印";
                img.title = "地图打印";
                switchImageSourceAndAlphaBlend(img, toolbar.items[toolbarItemName].defaultImage);
            }
        }


       

  • 相关阅读:
    CSS3 target伪类简介
    不用position,让div垂直居中
    css3 在线编辑工具 连兼容都写好了
    a标签伪类的顺序
    oncopy和onpaste
    【leetcode】1523. Count Odd Numbers in an Interval Range
    【leetcode】1518. Water Bottles
    【leetcode】1514. Path with Maximum Probability
    【leetcode】1513. Number of Substrings With Only 1s
    【leetcode】1512. Number of Good Pairs
  • 原文地址:https://www.cnblogs.com/tuncaysanli/p/1646840.html
Copyright © 2011-2022 走看看