javascript小工具
获取当前日期:
new Date().getFullYear() + "-" + (new Date().getMonth() + 1< 10? '0' + new Date().getMonth() + 1: new Date().getMonth() + 1 ) + '-' + new Date().getDate()
阻止element form表单默认提交
@submit.native.prevent
Element form表单显示必填样式星星
Label填空格,否则不显示星星
javascript 打开新浏览器窗口
location.href = "javascript:window.open('http://um-selfservice.paic.com.cn/um-selfservice/ss/forget_password_valid_frame.jsp','newwindow', 'height=768,width=1366, top=0, left=0')"
window.open 是 javaScript 打开新窗口的方bai法,在前面加上 javascript: 是用于du a 标签的超链接调用 js 方法。zhi
window.open 基本语法: window.open(pageURL,name,parameters);具体示例daowindow.open('page.html', 'newwindow', 'height=100, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no')
window.open("http://www.w3school.com.cn","_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400")
发表评论 (审核通过后显示评论):