javascript-objects
How do you create a reference to an object from its name as a string?
window[objref] does not work self[objref] does not work either Here is jsfiddle. Here is the code: var bob = {[详细]
2023-03-12 03:55 分类:问答Javascript object to behave differently, based on index ending: foo vs. foo()
Is it possible to construct an object in a way to return the following: baseObject.foo;// return a string describing what foo does[详细]
2023-03-11 22:55 分类:问答A clean way of checking whether an object is an instance of window.constructor
The title pretty much says it all. I need to check whether an object is an instance of the DOM:Window interface. window will pass the test, window.frames[xyz] as well, should the iframe exist.[详细]
2023-03-10 01:27 分类:问答Object - An Object in the Object - An array of those Objects
I\'m new to javascript so let me just say that right up front. A web site I frequent has 50 or so items, with details about that item, in a table. Each table row contains several td cells. Some rows[详细]
2023-03-07 04:13 分类:问答How can I extend properly a JS object?
Let\'s say I have something like this in a file named main.js: function obj_name() {} obj_name.prototype = {[详细]
2023-03-05 03:14 分类:问答JSON Error when parsing "... has no method 'replace'"
Let me pr开发者_运维问答eface this with the admission that I am a complete programming and javascript noob and that fact is the source of my trouble.[详细]
2023-03-04 09:24 分类:问答JavaScript: Custom property with vars
I have a JavaScript function like that: function someCoolActionHere(input) { return { input: \'someValue\' };[详细]
2023-03-02 12:35 分类:问答JavaScript/JSON: Get unknown property of an object
开发者_如何学JAVAIf I have a JSON object like this: { \"message\": { \"name\": { \"stringLengthTooShort\": \"blub\" }[详细]
2023-03-02 11:04 分类:问答jQuery OO Event-binding
Basically, I\'ve an object: function tomatoe(name, owner) { $(\'<div>\').click(this.squish).appendTo(myElement).text(\'I\\\'m a happy tomatoe called \' + name);[详细]
2023-02-25 19:30 分类:问答Javascript string to object reference (without eval() or indexes)
I\'ve seen quite some related questions and google results, but none seem to match my problem. I\'m getting a string \"header.h2\" which I want to contencate to \'var objects\'.[详细]
2023-02-25 09:17 分类:问答
加载中,请稍侯......