我想在Div中选择一个具有动态ID(pdf(file = paste("R_Plot_", format(Sys.time(), "%Y_%m%e_%H%M_%S"), ".pdf",sep=""),
width = 11, height = 8)
pMar = 0
par(mar = c(pMar,pMar,pMar,pMar))
lenM = 10
dimSq = lenM * lenM
layout(matrix(seq(1,dimSq), lenM,lenM))
for(i in 1:dimSq){
plot(0,0, yaxt = 'n', xaxt='n', ann=FALSE, cex=0)
tSize = i / dimSq
text(0,0, labels=paste("cex=",tSize), cex=tSize )
}
dev.off()
)的输入,是否可以将其存档?
我的示例代码是这样的:
[id^="SML_ID_"]
任何想法?
编辑:
HTML的结构:
$('[id^="SML_ID_"] .social_media_input_type').on("change", function() {
var Link_ID = $('[id^="SML_ID_"]').attr("id");
var Link_Type = $("SML_ID_" + Link_ID + " > social_media_input_type").text();
Link_ID.replace("SML_ID_", "");
$("SML_ID_" + Link_ID).text("Input a" + Link_Type + "link");
});
答案 0 :(得分:2)
通过附加到容器来使用委托
$(document).on('change','[id^="SML_ID_"] .social_media_input_type', function() {
var Link_ID = $('[id^="SML_ID_"]').attr("id");
var Link_Type = $("SML_ID_" + Link_ID + " > social_media_input_type").text();
Link_ID.replace("SML_ID_", "");
$("SML_ID_" + Link_ID).text("Input a" + Link_Type + "link");
});