87,991
社区成员
发帖
与我相关
我的任务
分享
function convertStringText(str1,str2,divId,inputId){
var s1=str1;
var str=/{*\{*\}*}/;
if(str.exec(s1)){
s1=s1.replace(/\{([^\}]+)\}/g,'<input type="text" class="'+inputId+'" style="border-color: #878787; border-style: solid; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 1px; border-left-width: 0px;text-align:center" size="10" maxlength="10" id="'+inputId+'" value="" />');
}
var msg= '<input type="checkbox" onclick="fnSetName(this)" id="'+inputId+'" value="'+str2+'""/>';
if(s1==""){
$("#"+divId).html($("#"+divId).html()+msg+str1+'<br/>');
}
else{
$("#"+divId).html($("#"+divId).html()+msg+s1+'<br/>');
}
}
function fnSetName(){
$(this).attr('name','');
}
function getByTagName() {
$('input[name="设定的Name值"]');
}
根据我的理解给你写个大概的意思