current position:Home>Using Web3's methods myMethod. The send method cannot change the data in the smart contract

Using Web3's methods myMethod. The send method cannot change the data in the smart contract

2022-02-03 22:46:28 Q & A of Denglian community

Code

$("#button").on('click', function(){    var name = $("#name").val();    var age = $("#age").val();    infoContract.methods.setInfo(name,age).send({from: '0x1eB41Ac9cEeff8a72876e3010CB9749dd50F4c3C'},function(error, transactionHash){      if(!error){          console.log("set ok");      }    })});

QQ202004274727.png






Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032246267304.html

Random recommended