当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - How can I point to document-object from string-value of document?

问题描述:

//How can I make this work:

var key = 'document';

var propy = 'title';

var val = 'a new title';

$(key).prop(propy,val);

//

//As this does

//$(document).prop('title','test');

All incoming vars must be strings. I understand the security concerns.

分享给朋友:
您可能感兴趣的文章:
随机阅读: