起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1313|回复: 5

[结贴] 怎么在wex5的js文件里面写html代码?

[复制链接]

168

主题

744

帖子

1646

积分

金牌会员

Rank: 6Rank: 6

积分
1646
QQ
发表于 2017-1-13 10:57:26 | 显示全部楼层 |阅读模式
怎么在wex5的js文件里面写html代码?

1

主题

6163

帖子

2095

积分

金牌会员

Rank: 6Rank: 6

积分
2095
QQ
发表于 2017-1-13 11:01:21 | 显示全部楼层
干嘛  你要append代码段吗   如果是的话 你就直接写就可以了呀
回复 支持 反对

使用道具 举报

168

主题

744

帖子

1646

积分

金牌会员

Rank: 6Rank: 6

积分
1646
QQ
 楼主| 发表于 2017-1-13 11:17:42 | 显示全部楼层
就是想在写一个能遍历html代码的js啊。就像用动软代码生成器,写一个遍历html的方法,然后点生成代码就能生成有规则的html代码。

这是动软代码生成器

这是动软代码生成器

我是我想实现动软代码生成器的功能

我是我想实现动软代码生成器的功能
个人QQ:85969042

         欢迎大手子带我飞~
                          ┌───────────┐
                           |  ▉▉▉▉▉▉▉▉ 99%   │       苞米地里的蒙面侠                 
                          └───────────┘
回复 支持 反对

使用道具 举报

1

主题

6163

帖子

2095

积分

金牌会员

Rank: 6Rank: 6

积分
2095
QQ
发表于 2017-1-13 13:23:49 | 显示全部楼层
爱喝牛奶的面包 发表于 2017-1-13 11:17
就是想在写一个能遍历html代码的js啊。就像用动软代码生成器,写一个遍历html的方法,然后点生成代码就能生 ...

那是不是要引入第三发的东西了呀?否者应该是不行的吧!
回复 支持 反对

使用道具 举报

168

主题

744

帖子

1646

积分

金牌会员

Rank: 6Rank: 6

积分
1646
QQ
 楼主| 发表于 2017-1-13 17:50:01 | 显示全部楼层
会写啦,谢谢啦,但是不是像您说的那样,是这样的。
  1. if(columnidx == 1){
  2.                              innerText += '<div xid="formGroup'+ rowidx +'" class="form-group"> ';
  3.                     }   
  4.                     innerText += '<div xid="col1' + columnidx + '" class="col-sm-2">  '
  5.                                       + '<label xid="'+ columnName +'L" class="control-label" bind-text=\'$model.'+ currentDataName +'.label("'+ columnName +'")\'/>'
  6.                                                 + '</div> '
  7.                                                 + '<div xid="col2' + columnidx + '" class="col-sm-2">';     
  8.                     if(row.val("controlType")=='下拉列表'){
  9.                             innerText += ' <div class="x-gridSelect" component="$UI/system/components/justep/gridSelect/gridSelect" xid="gridSelect' + columnidx + '" bind-ref=\'$model.'+ currentDataName +'.ref("'+ columnName +'")\' bind-labelRef=\'$model.'+ currentDataName +'.ref("'+ columnName +'")\' clearButton="true" inputFilterable="true" > '
  10.                                        + ' </div> ' ;             
  11.                     }else if(row.val("controlType")=='文本框'){
  12.                     innerText += ' <input xid="'+ columnName +'" class="form-control" component="$UI/system/components/justep/input/input" bind-ref=\'$model.'+ currentDataName +'.ref("'+ columnName +'")\'/>';
  13.                     }else if(row.val("controlType")=='日期框'){
  14.                     innerText += ' <input component="$UI/system/components/justep/input/input" class="form-control" xid="'+ columnName +'" dataType="Date" format="yyyy-MM-dd" bind-ref=\'$model.'+ currentDataName +'.ref("'+ columnName +'")\'> '
  15.                               + ' </input> ';
  16.                     }else if(row.val("controlType")=='日期时间框'){
  17.                     innerText += ' <input component="$UI/system/components/justep/input/input" class="form-control" xid="'+ columnName +'" dataType="DateTime" format="yyyy-MM-dd hh:mm" bind-ref=\'$model.'+ currentDataName +'.ref("'+ columnName +'")\'> '
  18.                               + ' </input> ';
  19.                     }else if(row.val("controlType")=='单选框'){
  20.                     innerText += ' <span component="$UI/system/components/justep/button/checkbox" class="x-checkbox" xid="'+ columnName +'" bind-ref=\'$model.'+ currentDataName +'.ref("'+ columnName +'")\'> '
  21.                               + ' </span> ';
  22.                     }
复制代码
个人QQ:85969042

         欢迎大手子带我飞~
                          ┌───────────┐
                           |  ▉▉▉▉▉▉▉▉ 99%   │       苞米地里的蒙面侠                 
                          └───────────┘
回复 支持 反对

使用道具 举报

168

主题

744

帖子

1646

积分

金牌会员

Rank: 6Rank: 6

积分
1646
QQ
 楼主| 发表于 2017-1-13 17:50:21 | 显示全部楼层
可以结帖啦
个人QQ:85969042

         欢迎大手子带我飞~
                          ┌───────────┐
                           |  ▉▉▉▉▉▉▉▉ 99%   │       苞米地里的蒙面侠                 
                          └───────────┘
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2025-6-27 17:34 , Processed in 0.052454 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表