前端页面和js

小知识

  1. js在执行时,如果不需要往下执行,需要返回,注意return false
    2.按钮等样式加上 disabled 就会变得不可用
  2. history.go(0)的用法,也可以用来刷新数据的,可以提交后使用他会刷新数据的变化

表单提交的几种方法

1.submit方式

<input type="submit" value="登录">

2.js改变表单提交的路径

<form role="form" action="#" method="get" th:action="@{/url1/}" id="myFrom">
	<button type="button" onclick="exportlist();">button</button>
</form>

JS内容
<script type="text/javascript">
    function exportlist(){
        document.forms.myFrom.action="/url2";
        document.forms.myFrom.submit();
    }
</script>

3.ajax提交

 <script type="text/javascript">
        function login() {
            $.ajax({
            //几个参数需要注意一下
                type: "POST",//方法类型
                dataType: "json",//预期服务器返回的数据类型
                url: "/users/login" ,//url
                data: $('#form1').serialize(),
                success: function (result) {
                    console.log(result);//打印服务端返回的数据(调试用)
                    if (result.resultCode == 200) {
                        alert("SUCCESS");
                    }
                    ;
                },
                error : function() {
                    alert("异常!");
                }
            });
        }
    </script>

超链接触发function并获取超链接的值

<a class="b04 co01" href="#" onclick="find(this.innerHTML)">郝</a>
function find(label) {
    alert(label)
}

div的边距

设下边距为10像素
设上边距为10像素

对一个div点击事件并跳转 .(class)

 $(".t_btn6").click(function(){
    window.location.href="<%=basePath%>/reportForm/toAllComment.do";
});

echarts高看一点的图表和现成的页面,需要直接拿去

第一个页面
https://download.csdn.net/download/weixin_43283487/10907708
在这里插入图片描述
第二个
https://download.csdn.net/download/weixin_43283487/10907716

在这里插入图片描述
第三个https://download.csdn.net/download/weixin_43283487/10907718
在这里插入图片描述
*

分页展示

我觉得这种样式的分页要好看很多,带页面布局全部上传,需要拿去
https://download.csdn.net/download/weixin_43283487/10908530
在这里插入图片描述

错误页面

https://download.csdn.net/download/weixin_43283487/10908448
在这里插入图片描述

3D标签云
https://download.csdn.net/download/weixin_43283487/10908457
在这里插入图片描述

bootstrap的一套页面
https://download.csdn.net/download/weixin_43283487/10908596

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

orange大数据技术探索者

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值