如何使用链接更新按钮

时间:2019-05-31 16:34:44

标签: html

我想用链接更新按钮。当我单击不指向链接的按钮时,我正在使用锚标记href仍然不起作用。对于onClick功能,使用ActiveX,因此,新的浏览器不支持ActiveX。我想摆脱客户端脚本中的ActiveX并使其正常工作。任何解决此问题的方法。

  ***emphasized text***<div ng-if="data.mFixItems.length > 0" ng-repeat="item in data.mFixItemsFilter" class="list-group-item"  >
  <div class="incident-description">
    <div class = "accordion" data-toggle = "collapse" data-target="#collapseAccordion_{{item.sys_id}}" ng-click="accordionClick(this)" is-open="isopen" ng-click="isopen=!isopen">
      <p id ="accordionTitle">
        <span ng-class="{'glyphicon glyphicon-plus': !isopen, 'glyphicon glyphicon-minus': isopen}"></span>
        {{item.u_name}}
      </p>
      <div id = "collapseAccordion_{{item.sys_id}}" class="panel-collapse collapse">
        <p class="text-muted">
          <small>{{item.u_description}}<br /></small>
        </p>
  <a href="{{item.u_fixlink}}" class="btn btn-default btn-block btn-primary" ng-click="onClickEvent(item)">Launch Now</a>


       **strong text**function($scope, spUtil) {
try{
    var c = this;
    c.options.color = "primary";

    var mFixItemsFilter = [];
    this.data.currentPage = 0;
    this.data.pageLimit = 4;
    //this.data.totalItems = this.data
    this.data.pageTotal = Math.ceil(this.data.mFixItems.length / this.data.pageLimit);
    this.data.mFixItemsFilter = this.data.mFixItems.slice(0, this.data.pageLimit);

    $scope.accordionClick = function (item){
        //document.getElementById("accordionIcon").innerHTML ="-";
        //$("#accordionIcon")
        //console.log(item);
        //this.toggle();
    }



    $scope.onClickEvent = function(item){
        try {

    //var oShell = new ActiveXObject("Shell.Application");
            var commandtoRun = item.u_fixlink;

    //oShell.ShellExecute(commandtoRun,"","","open","1");

    updateCount(item);
        }
        catch (err) {
            spUtil.addErrorMessage("This browser is not supported. Please try again in Internet Explorer");

        }
    }

由于ActiveX-不支持此浏览器。请在Internet Explorer中重试。

我希望按钮启动一个exe链接

0 个答案:

没有答案