我正在尝试在脚本中调用函数,并且应该在单击按钮后运行。代码如下所示。此代码将调用另一个PEGA API。但是,当运行以下代码时,我可以看到控制台无限期地打印“运行”。知道为什么会这样吗?

<title>Sample "Hello, World" Application</title>

function setMashupName() {

function callBackForSetVendorID(value){
//returns true/false. 
  console.log("status for setVendorID: " + value);  
/*  function setMashupName() {
console.log("I am in");

function callBackForSetVendorID(value){
  console.log("status for setVendorID: " + value);  
<body bgcolor=white>

<input type="button" value="Set class on Gadget A and load Gadget B " onclick="setMashupName()"/>&nbsp &nbsp &nbsp

<table border="0">
<img src="images/tomcat.gif">
<h1>Sample "Hello, World" Application</h1>
<p>This is the home page for a sample application used to illustrate the
source directory organization of a web application utilizing the principles
outlined in the Application Developer's Guide.

<p>To prove that they work, you can execute either of the following links:
<li>To a <a href="hello.jsp">JSP page</a>.
<li>To a <a href="hello">servlet</a>.