javascript - 我无法弄清楚以下函数的字符串返回
问题描述
tin.onchange = addNewValue;
function addNewValue(e){
c1 = e.target.value;
console.log(c1);
return c1;
}
tin2.onchange = addNewValue2;
function addNewValue2(f){
c2 = f.target.value;
return c2;
}
line2 = c1 + c2;
;
console.log(line2);
我试图让通过动态出现的表单填充用户的变量返回到我可以添加到原始字符串的字符串。但是它们之间的链接不起作用。
我错过了什么?
解决方案
推荐阅读
- php - get() 不起作用,但 First() 起作用。我需要使用 get() 来获取我的所有数据
- windows - 无法拉取 iis 映像并在 windows10 上使用 Docker 工具箱运行它
- python - 如何更改不正确的 Django 路径(django.__path__)?
- java - 无法在 Tomcat 上部署 Saiku。Saiku 卡在加载屏幕上
- javascript - 为什么调用 DOM 历史 API 会导致 cordova 无法在 Android 应用中加载图像?
- apache-spark - 在 spark scala 中过滤具有两种不同模式的列
- excel-formula - 捕获具有条件的相邻单元格
- php - 仅当“用户访问网站”时 Wordpress cron 作业?
- git - 为什么我有权限推送到新创建的 gitlab 项目?
- db2 - 使用 Thorntail / Wildfly Swarm 配置 db2 数据源