小编bor*_*eux的帖子

document.execCommand()FontSize以像素为单位?

如何使用document.execCommand?将字体大小更改为30px(例如)?

这个:

document.execCommand("fontSize", false, "30px");
Run Code Online (Sandbox Code Playgroud)

不起作用,因为在函数execCommand的第三个参数中,它只允许我在1到7之间输入一个值.

javascript editor execcommand

15
推荐指数
6
解决办法
2万
查看次数

如何在Android上用Java提取bz2文件?

如何在Android上用Java提取bz2文件?android中是否包含任何库?

java android

4
推荐指数
1
解决办法
3142
查看次数

SHA1 hmac PHP与Javascript - 结果不同?

您好我在javascript中使用类来散列字符串:https: //ssl.bsk.com.pl/mobi/js/sha1.js

hex_hmac_sha1("927545161", "asdasdasdasd?") ;
Run Code Online (Sandbox Code Playgroud)

结果是:5db0194c834d419fc5d68b72c88af1ac8ee749d6

在PHP中我是哈希:

echo hash_hmac('sha1', "asdasdasdasd?", '927545161');
Run Code Online (Sandbox Code Playgroud)

但结果是:0b115775a20bed9922b6a9cc934cb5328fe71ade

错误在哪里?5db0194c834d419fc5d68b72c88af1ac8ee749d6!= 0b115775a20bed9922b6a9cc934cb5328fe71ade

javascript php sha1

1
推荐指数
1
解决办法
1776
查看次数

在 EaselJs 中创建橡皮擦 - 接下来做什么

我想在easelJS上写位图橡皮擦。我想,我已经走了一半的路了......

这是演示: http: //jsfiddle.net/bordeux/g2Lwvsuv/2/

和我的代码:

var example = function() {
    this.constructor.apply(this, arguments);
};

example.prototype.constructor  = function() {
    this.$canvas = $("canvas");
    this.container = {};
    this.objects = {};
    this.resizeEvents = [];
    this.prepareCanvas();
    this.refreshSize();
    this.bindEvents();
};

example.prototype.bindEvents = function() {
    var self = this;
    $(window).resize(function(){
        self.refreshSize();
    });
};

example.prototype.refreshSize = function() {
    this.stage.canvas.width = window.innerWidth;
    this.stage.canvas.height = window.innerHeight;

    this.resizeEvents.forEach(function(item) {
        item();
    });
};

example.prototype.getObject = function(name) {
    return this.objects[name];
};

example.prototype.setObject = function(name, obj) {
    this.objects[name] = obj;
    return obj;
};

example.prototype.addResizeEvent = …
Run Code Online (Sandbox Code Playgroud)

html javascript canvas easeljs

1
推荐指数
1
解决办法
988
查看次数

标签 统计

javascript ×3

android ×1

canvas ×1

easeljs ×1

editor ×1

execcommand ×1

html ×1

java ×1

php ×1

sha1 ×1