1-21051P92355F1
 
織夢(mèng)內(nèi)容模型自定義字段設(shè)置一個(gè)隨機(jī)數(shù),如果有其他需求的也可以參考這種方式來(lái)自定義的自己的字段要求
  • 實(shí)現(xiàn)教程
后臺(tái)-核心-內(nèi)容模型,找到你的自定義字段,在【自定義表單HTML】里填入
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="margin-bottom:3px;">
    <tr>
        <td width="90" class="bline" height='24'> ~name~:</td>
        <td class="bline">~form~</td>
    </tr>
</table>
<script>
    document.getElementById("jiage").value = Math.floor(Math.random() * 100 + 1);
</script>
注意:上面的jiage要對(duì)應(yīng)你自己的字段名