我有一个具有扩展名的文件:
.doc or .docx
我想以这种方式链接它:
document.getElementById("file").innerHTML = "View file sent <a href='../folder/filename" +
(what syntax do I need to add here if I wanted to print which extention file is exist on that folder)
在 PHP 中我们可以做到这一点
var1 = ".doc";
var2 = ".docx";
var1 ? var1 : var2;
JavaScript 中 this 的等价物是什么?