Q:

How to pass the string value to the function with a html string

I'm pass a order id with leading-zero to function, but in the function, the parameter alway convert to number without leading-zero,What should I do?
formatter:function(value, row, index) {
    return "<a href='javascript:listGoods("+'09100089'+")'><i class='fa fa-search-plus' /></a>";
                }

function listGoods(id) {
    jp.openViewDialog("goodInfo", "${ctx}/order/order/goods?id=" + id, "800px", "500px");
  }

A:

Your problem is you pass your parameter as a number not as a string. The solution looks like this: 
formatter:function(value, row, index) {
    return "<a href='javascript:listGoods(`"+'09100089'+"`)'><i class='fa fa-search-plus' /></a>";
  }

function listGoods(id) {
    jp.openViewDialog("goodInfo", "${ctx}/order/order/goods?id=" + id, "800px", "500px");
  }

Here is another example:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>


<script>
    function addButton() {
        document.body.innerHTML = "<button onclick='showMeParameter(`" + "09100089" + "`)'>my button</button>";
    }

    function showMeParameter(id) {
        alert(id);
    }

    addButton();
</script>
</body>
</html>

