ejs

    2熱度

    1回答

    我正在尋找傳遞參數到我的Stylus文件時它正在呈現。因此,例如在我的app.js文件我有: app.get('/myPage', function(req, res) {res.render('myPageTemplate', { title: 'MyPageTitle' , myColor: '#E3D'});}); app.get('/myPage2', function(req, re

    0熱度

    1回答

    我目前正在使用Node.Js(Express)+ MongoDB + Javascript/Jquery + HTML(使用EJS作爲我的模板引擎)來開發自己的項目。 目前我有一些從Node.js路由器發送數據到Views的知識,並使用「POST」和「GET」方法將視圖中的表單數據發送迴路由器。 我想知道是否有從發送到瀏覽Node.js的路由器數據的其他方法,而無需通過 <form action=

    1熱度

    1回答

    我HTML轉換成PDF和它完美的工作,但我有一個如何被顯示的數據的問題。 我有一個字符串數組,我通過他們的循環,我的EJS template.For例子中顯示它們: <div style="page-break-after: auto; padding: 10px;"> <h3>Cost Saving Calculation:</h3> <p><%= modules[i].co

    1熱度

    1回答

    我試圖去適應我的錯誤代碼,因此它也可以處理其他類型的錯誤一樣成功 例如,當我使註冊網頁 res.render('signup', { errors: req.flash('errors') }); 在提交頁面,我成功地發送錯誤閃存與此代碼: req.flash('errors', { msg: 'Account with that email address already exists.

    1熱度

    2回答

    我想從API獲取數據後呈現文件。 代碼 $(document).ready(function() { $(document).delegate("#editUser", "click", function() { var userId = $(this).data('id'); $.post("/userProfile",{"userId":userId},fun

    1熱度

    1回答

    我想截斷post.excerpt。 實際代碼是<%- post.excerpt || post.content%> 上面顯示一個所有博客帖子的介紹文字。 現在我想截斷該介紹文本的長度爲25個字符。 的截斷代碼就像這個例子: <%- truncate('And they found that many people were sleeping better.', {length: 25, omiss

    0熱度

    1回答

    我有一個ejs模板呈現一個數組(稱爲「operaciones」)sql請求的結果。 我需要實現的是,當用戶選擇一個註冊表(「unidad de obra」)時,其他輸入顯示字段「unidad de medida」和「precio unitario」。 這是我的代碼: <div class="col-md-6"> <label for="via">Unidad de obra:</labe

    2熱度

    1回答

    對不起,我是node.js的新手,想知道我們是否可以在ejs文件中使用vue.js。

    1熱度

    1回答

    我正在嘗試製作一個瑣事遊戲。我想使它在哪裏你可以點擊一個答案,並創建一個邊框,並增加點變量 這裏是整個頁面。 <% include ../partials/boilerplate %> <% var points = 0; correctAnswer = (num) => { document.getElementById(`correctAnswer${i}`).style.b

    1熱度

    1回答

    我的代碼: HTML文件: <form action="/form" method="post" enctype="multipart/form-data"> Name: <input type="text" name="name" /><br> Email: <input type="email" name="email" /> <br> Age: <inpu