|
|
本帖最后由 法老王 于 2017-5-7 17:45 编辑
已经找到了 方法 那就贴出来把
将这个代码插入到购物车模板 configureproduct.tpl 主机名称的下面 即可
- <script>
- $("input[name=hostname]").val("Tzhost-"+(new Date()).getFullYear()+((new Date()).getMonth()+1).toString()+(new Date()).getDate()+parseInt(Math.random()*(999+1),10));
- </script>
复制代码
对了 https://idc.ac/ Tzhost棒棒哒
<div class="row">
<div class="col-sm-6">
<div class="form-group">
<label for="inputHostname">{$LANG.serverhostname}</label>
<input type="text"autocomplete="false" readonly="readonly" name="hostname" class="form-control" id="inputHostname" value="{$server.hostname}" placeholder="servername.idc.ac">
</div>
</div>
就是这行代码下面 我还加了不可以更改 大家可以看看 |
|