通过form的post调用post的函数,对内容添加后,想跳转到详细页,但是详细页需要id指定get
方法才可以访问,给button添加herf指定id也没用,请问怎么处理的。
<form class="layui-form layui-form-pane" method="post" enctype="multipart/form-data"action="/update?id={{.note.Id}}" >
<div class="layui-form-item">
<label class="layui-form-label">标题</label>
<div class="layui-input-block">
<input type="text" name="title" required=""
value="{{.note.Title}}"
lay-verify="required" placeholder="请输入标题"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item layui-form-text">
<div class="layui-input-block" class="info">
{{/* <div id="edit" style="background: #fff;">*/}}
<textarea name="info" class="info" style="width: 730px;height: 400px;overflow-x:hidden;word-wrap: break-word " >{{.note.Content}}</textarea>
{{/*/</div>*/}}
{{/* <input class="input-xlarge focused" name="info" type="text" id="info" >*/}}
</div>
</div>
<div class="layui-form-item">
<label>上传图片:</label>
<img id="imgarea" src="{{.note.Img}}" width="240"/>
<input type="file" id="inputarea" style="color: transparent" class="input_file" name="uploadname">
</div>
<div class="layui-form-item">
<button class="layui-btn"
lay-submit=""
lay-filter="save" onclick=javascrtpt:jump()>修改
</button>
</div>
</form>
有疑问加站长微信联系(非本文作者)