• 每日日报2021.5.25


    今天完成内容:

    学习web

     主页

    <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@page import="dao.UserDao,bean.User"%>
    <%@page import="java.util.ArrayList"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="css/style.css">
    <script src="js/flexible.js" type="text/javascript"></script>
    <title>cpvr论文</title>
    </head>
    <script type="text/javascript">
    function add() {
    location.href = "add.jsp";
    }
    function res() {
    location.href = "view.jsp";
    }
    </script>
    <style>
    td {
    text-align: center;
    }

    .form-control {
    90%;
    }
    </style>

    <body>
    <%
    Object message = request.getAttribute("message");
    if(message!=null && !"".equals(message)){

    %>
    <script type="text/javascript">
    alert("<%=request.getAttribute("message")%>");
    </script>
    <%} %>
    <%
    UserDao dao=new UserDao();
    if(request.getAttribute("list") == null){
    ArrayList<User> list = dao.getall();
    request.setAttribute("list",list);
    }
    %>
    <table class="table table-hover table-striped table-bordered table-sm"
    id="resultshow">
    <tr>
    <td colspan="6">
    <h1>CPVR论文</h1>
    </td>
    </tr>
    <tr>
    <td colspan="3">
    <button type="button" class="btn btn-info" onclick="add()">添加信息</button>
    <button type="button" class="btn btn-info" onclick="res()">热词分析</button>
    </td>
    </tr>
    <tr>
    <td colspan="4" align="center">
    <form action="Select" method="post">
    <table>
    <tr>
    <td><input type="text" class="form-control" name="content"></td>
    <td><select name="way" class="form-control">
    <option value="">--请选择查询方式--</option>
    <option value="1">序号</option>
    <option value="2">名字</option>
    <option value="3">链接</option>

    </select></td>
    <td >
    <button type="submit" class="btn btn-info">查询</button>
    </td>
    </tr>
    </table>
    </form>
    </td>
    </tr>
    <tr>
    <td>序号</td>
    <td>名字</td>
    <td>链接</td>
    <td>操作<td>

    </tr>
    <c:forEach items="${list}" var="item">
    <tr>
    <td>${item.id}</td>
    <td>${item.name}</td>
    <td>${item.link}"</td>
    <td><a href="Delete?id=${item.id}" onclick = "return del()">删除</a>
    &nbsp;&nbsp;&nbsp;&nbsp;
    <a href="update?id=${item.id}">修改</a></td>
    </tr>
    </c:forEach>
    </table>
    </body>
    <script>
    //删除确认
    function del() {
    if (!window.confirm('是否要删除数据??'))
    return false;
    }
    </script>
    </html>

    <%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@page import="dao.UserDao,bean.User"%>
    <%@page import="java.util.ArrayList"%>
    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="ISO-8859-1">
    <title>可视化图</title>
    <script src="js/jquery.min.js"></script>
    <script src="js/echart3.js"></script>
    <script src="js/echarts-wordcloud.js"></script>
    <style>


    #main{
    100%;
    height: 1500px;

    border:1px solid #ddd;
    float:center;
    }

    </style>
    </head>
    <div align="center"><a target='_blank' href="index.jsp">论文查询</a></div>
    <body>

    <div id="zhuzhuang" style="height:500%;">

    </div>
    <script type="text/javascript">
    var ly;
    function xyz(){

    var dt;
    var hzb=new Array(0);
    var zzb=new Array(0);

    $.ajax({
    url : "lalala",
    async : true,
    type : "POST",
    data : $('#SD').serialize(),

    dataType : "json",

    success : function(data) {
    dt = data;
    ly=data;
    var mydata = new Array(0);
    for (var i = 0; i < dt.length; i++) {
    var d = {};

    d["name"] = dt[i].name;

    d["value"] = dt[i].value;
    mydata.push(d);
    hzb.push(dt[i].name);
    zzb.push(dt[i].value);
    }
    //alert("mydata"+mydata);
    var myChart = echarts3.init(document.getElementById('main'));
    //设置点击效果



    myChart.setOption({
    title: {
    text: ''
    },
    tooltip: {},
    series: [{
    type : 'wordCloud', //类型为字符云
    shape:'smooth', //平滑
    gridSize : 8, //网格尺寸
    size : ['50%','50%'],
    //sizeRange : [ 50, 100 ],
    rotationRange : [-45, 0, 45, 90,60,16], //旋转范围
    textStyle : {
    normal : {
    fontFamily:'微软雅黑',
    color: function() {
    return 'rgb(' +
    Math.round(Math.random() * 255) +
    ', ' + Math.round(Math.random() * 255) +
    ', ' + Math.round(Math.random() * 255) + ')'
    }
    },
    emphasis : {
    shadowBlur : 5, //阴影距离
    shadowColor : '#333' //阴影颜色
    }
    },
    left: 'center',
    top: 'center',
    right: null,
    bottom: null,
    '100%',
    height:'100%',
    data:mydata
    }]
    });
    var zhudiv=echarts3.init(document.getElementById('zhuzhuang'));
    option = {
    xAxis: {
    type: 'category',
    data: hzb
    },
    yAxis: {
    type: 'value'
    },

    series: [{
    data: zzb,
    itemStyle: {
    normal: {
    label: {
    show: true,
    position: 'top',
    textStyle: {
    color: 'black'
    }
    }
    },
    },
    type: 'bar',
    showBackground: true,
    backgroundStyle: {
    color: 'rgba(180, 180, 180, 0.2)'
    }
    }]
    };
    option && zhudiv.setOption(option);

    biaoge();
    },
    error : function() {
    alert("请求失败");
    },
    });
    }
    function biaoge(){
    var tab=document.getElementById("kkk");
    var str="<table>";
    for(i=0;i<ly.length;i++ ){
    str=str+"<tr><td>"+ly[i].name+"</td><td>"+ly[i].value+"</td></tr>";

    }
    str=str+"</table>";
    var div = document.createElement("div");
    div.id="changeresdiv";
    div.innerHTML = str;
    tab.appendChild(div);
    }
    /*function yyx(){
    var zhudiv=echarts3.init(document.getElementById('zhuzhuang'));
    option = {
    xAxis: {
    type: 'category',
    data: hzb
    },
    yAxis: {
    type: 'value'
    },

    series: [{
    data: zzb,
    itemStyle: {
    normal: {
    label: {
    show: true,
    position: 'top',
    textStyle: {
    color: 'black'
    }
    }
    },
    },
    type: 'bar',
    showBackground: true,
    backgroundStyle: {
    color: 'rgba(180, 180, 180, 0.2)'
    }
    }]
    };
    option && zhudiv.setOption(option);
    }*/
    </script>
    <form action=" method="post" id="SD">
    <table>
    <tr><td><input type="text" name="xxx"></td></tr>
    </table>
    </form>
    <input type="button" id= 'yyy' onclick="xyz()" value ="请选择查询词数"/>
    <div id="main" align="center" style="height:300%;">

    </div>
    <div id="kkk"></div>
    </body>
    </html>

    看视频

    遇到问题:

    明日目标:

    学习web端的开发

    学习css

  • 相关阅读:
    Codeforces Round #325D (Div. 2) (DP)
    Codeforces Round #382 (Div. 2) (模拟|数学)
    HDU5950-Recursive sequence(矩阵快速幂)
    9. javacript高级程序设计-客户端检测
    8. javacript高级程序设计-BOM
    7. javacript高级程序设计- 函数表达式
    6. javacript高级程序设计-面向对象设计
    Js注释
    5. javacript高级程序设计-引用类型
    4. javacript高级程序设计-变量、作用域和内存问题
  • 原文地址:https://www.cnblogs.com/leiyu1905/p/14913442.html
Copyright © 2020-2023  润新知