Nessuna descrizione

chat-assess.html 3.5KB

    <!doctype html> <html lang="en" class="feedback"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" /> <title></title> <link rel="stylesheet" type="text/css" href="../css/mui.min.css" /> <link href="../css/iconfont.css" rel="stylesheet" /> <link rel="stylesheet" type="text/css" href="../css/app.css" /> <style> #textbox { position: relative; } .text_count { position: absolute; right: 0; bottom: 0; font-size: 12px; } </style> </head> <body> <header class="mui-bar mui-bar-nav toptitbox"> <!--mui-action-back--> <span class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left topback"></span> <h1 class="mui-title toptit">评价</h1> <span id="submit" class="mui-pull-right topsave">发送</span> </header> <div class="mui-content"> <div class="assessbox"> <div class="mui-content-padded "> <div class="mui-inline">整体评价</div> <div class="icons mui-inline levelbox" style="margin-left: 6px;" id="starContainer"> <span data-index="1" class="mui-icon iconfont icon-favor"></span> <span data-index="2" class="mui-icon iconfont icon-favor"></span> <span data-index="3" class="mui-icon iconfont icon-favor"></span> <span data-index="4" class="mui-icon iconfont icon-favor"></span> <span data-index="5" class="mui-icon iconfont icon-favor"></span> </div> </div> <div class="mui-content-padded"> <div class="mui-inline">评价留言</div> </div> <div class="row mui-input-row" id="textbox"> <div id='question' class="mui-input-clear question textareabox" contenteditable="true"></div> <div class="text_count"><span><span id="text-count">0</span>/300字</span></div> <input type="text" value="0" style="display: none;" id="inp"/> </div> </div> </div> <script src="../js/public/mui.min.js"></script> <script src="../js/public/base.js"></script> <script src="../js/chat-assess.js"></script> <script type="text/javascript"> mui.init(); mui('.mui-scroll-wrapper').scroll(); (function() { var index = 1; var size = null; var imageIndexIdNum = 0; var starIndex = 0; var feedback = { question: document.getElementById('question'), submitBtn: document.getElementById('submit') }; /** *提交成功之后,恢复表单项 */ feedback.clearForm = function() { feedback.question.value = ''; index = 0; size = 0; imageIndexIdNum = 0; starIndex = 0; //清除所有星标 mui('.icons span').each(function (index,element) { if (element.classList.contains('icon-favorfill')) { element.classList.add('icon-favor') element.classList.remove('icon-favorfill') } }) }; //应用评分 mui('.icons').on('tap','span',function(){ var index = parseInt(this.getAttribute("data-index")); var parent = this.parentNode; var children = parent.children; if(this.classList.contains("icon-favor")){ for(var i=0;i<index;i++){ children[i].classList.remove('icon-favor'); children[i].classList.add('icon-favorfill'); } }else{ for (var i = index; i < 5; i++) { children[i].classList.add('icon-favor') children[i].classList.remove('icon-favorfill') } } starIndex = index; }); })(); </script> </body> </html>