<input type="text" name="transCode" id="transCode" value="${btpTransInfoInput.transCode}" hidden="true"/> var transCode = $('#transCode').val(); ${btpTransInfoInput.transCode}有值transCode为什么为‘’
时间: 2023-07-19 08:55:14 浏览: 71
如果 `${btpTransInfoInput.transCode}` 在页面加载时有值,但是在 JavaScript 中使用 `$('#transCode').val()` 获取 `transCode` 的值时却为空字符串,那么可能是因为 JavaScript 代码执行的时间点不同于 `${btpTransInfoInput.transCode}` 被赋值的时间点。可能是在 JavaScript 代码执行之前,`${btpTransInfoInput.transCode}` 的值已经被修改或被异步加载了。解决这个问题的一种方法是将 JavaScript 代码放到页面加载完成的回调函数中,确保 `${btpTransInfoInput.transCode}` 的值已被正确赋值。另外,您也可以在浏览器控制台中打印 `${btpTransInfoInput.transCode}` 和 `$('#transCode').val()` 的值,以便更好地理解问题出在哪里。
相关问题
static/res/js/transcode.worker.js
I'm sorry, as an AI language model, I do not have access to external files or directories on specific websites or servers. Can you provide more context or information about the file you're referring to?
我要用xml个格式传给后台数据,里面包含有string类型的TransCode字段,还有 List<Map<String,String>>类型的SgnInf,InstgInf,TrxInf,其中SgnInf中包含SgnAcctIssrId,SgnAcctTp,SgnAcctNm,IDNO,MobNo,LglRepNm, TrxInf里面包含TrxId,TrxCtgy,SgnNm,SgnExp, InstgInf里包含InstgId,InstgAcct,LgnId, 这个报文怎么写
以下是一个示例的XML格式报文,您可以根据需要进行修改:
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Root>
<TransCode>your_trans_code_here</TransCode>
<SgnInf>
<SgnAcctIssrId>issuer_id_1</SgnAcctIssrId>
<SgnAcctTp>account_type_1</SgnAcctTp>
<SgnAcctNm>account_name_1</SgnAcctNm>
<IDNO>id_number_1</IDNO>
<MobNo>mobile_number_1</MobNo>
<LglRepNm>legal_representative_name_1</LglRepNm>
</SgnInf>
<InstgInf>
<InstgId>institution_id_1</InstgId>
<InstgAcct>institution_account_1</InstgAcct>
<LgnId>login_id_1</LgnId>
</InstgInf>
<TrxInf>
<TrxId>transaction_id_1</TrxId>
<TrxCtgy>transaction_category_1</TrxCtgy>
<SgnNm>signer_name_1</SgnNm>
<SgnExp>signing_expiration_1</SgnExp>
</TrxInf>
<SgnInf>
<SgnAcctIssrId>issuer_id_2</SgnAcctIssrId>
<SgnAcctTp>account_type_2</SgnAcctTp>
<SgnAcctNm>account_name_2</SgnAcctNm>
<IDNO>id_number_2</IDNO>
<MobNo>mobile_number_2</MobNo>
<LglRepNm>legal_representative_name_2</LglRepNm>
</SgnInf>
<InstgInf>
<InstgId>institution_id_2</InstgId>
<InstgAcct>institution_account_2</InstgAcct>
<LgnId>login_id_2</LgnId>
</InstgInf>
<TrxInf>
<TrxId>transaction_id_2</TrxId>
<TrxCtgy>transaction_category_2</TrxCtgy>
<SgnNm>signer_name_2</SgnNm>
<SgnExp>signing_expiration_2</SgnExp>
</TrxInf>
</Root>
```
注意,这只是一个示例,您需要根据具体的需求进行修改和完善。建议您使用合适的XML解析工具将数据转换为XML格式报文。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)