我想截斷post.excerpt。 實際代碼是<%- post.excerpt || post.content%> 上面顯示一個所有博客帖子的介紹文字。 現在我想截斷該介紹文本的長度爲25個字符。 的截斷代碼就像這個例子: <%- truncate('And they found that many people were sleeping better.', {length: 25, omiss
我有一個ejs模板呈現一個數組(稱爲「operaciones」)sql請求的結果。 我需要實現的是,當用戶選擇一個註冊表(「unidad de obra」)時,其他輸入顯示字段「unidad de medida」和「precio unitario」。 這是我的代碼: <div class="col-md-6">
<label for="via">Unidad de obra:</labe