in Bitcoin, when we use ECDSA to sign, is the input m used in the ECDSA the bitcoin transaction?
Not directly. Depending on the script type of the UTXO that is being spent a different serialization of the transaction is created then it is hashed (so that e or h(m) is always fixed size) then that hash is used during signing.
Here is the simplest example spending a P2PKH output:
https://bitcoin.stackexchange.com/questions/32628/redeeming-a-raw-transaction-step-by-step-example-requiredNamely, can we know all the information of transaction(input tx, output tx, amount, etc) from m?
Yes. The complete transaction containing input, output,... is what is stored in every block or is sent to the mempool and remains there until it is confirmed.