JS点击按钮,“确认按钮”是按钮单元格名称
- document.querySelector("#"+Forguncy.Page.getCell('确认按钮')._pageCell.id+"_btn").click()
复制代码
获取应用路径,会自动生成 URL变量 例子:创建变量 URL = http://localhost:22914/Forguncy/
- var appname = Forguncy.Helper.SpecialPath.getBaseUrl().replace(/\//g,'');
- console.log(appname);
- if (appname == '') {
- Forguncy.CommandHelper.setVariableValue('URL', document.location.origin +'/')
- } else {
- Forguncy.CommandHelper.setVariableValue('URL', document.location.origin+'/'+appname+'/')
- }
复制代码
绑定输入框,获取输入的字符
- document.querySelector("#"+Forguncy.Page.getCell('输入框')._pageCell.id).addEventListener('input', function() {
- // 获取输入框的值
- var inputValue = document.querySelector("#"+Forguncy.Page.getCell('输入框')._pageCell.id).value;
- // 将输入结果显示到div中
- console.log('你输入的是: ' + inputValue);
- });
复制代码
|