1. Open the dedetempletsalbum_add.htm file and add the js method in the js script area in the top head.
1
2
3
4
function
setag(){
var
tagg=window.showModalDialog(
"tags_main.php"
,
"tag"
,
"dialogWidth=800px;dialogHeight=600px"
);
if
(
typeof
(tagg) !=
'undefined'
) document.form1.tags.value=tagg;
}
Copy after login
2. In the td entered in the Tag tag, add
A button.
3. Modify the dedetempletstags_main.php file. Add the following js code in the js script area in the top head.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var
tag=
""
;
function
selectTag(str)
{
tag=tag+
","
+str;
if
(tag.substr(0,1)==
','
) tag=tag.substr(1);
$(
"#selecttag"
).val(tag);
}
function
selectTagOK()
{
window.returnValue= $(
"#selecttag"
).val();
window.close();
}
Copy after login
4. Add the following html anywhere in the body, PS: where you want to display it.
1
<div style=
"padding-left:20px;border:1px"
>所选TAG: <input type=
'text'
id=
'selecttag'
name=
'selecttag'
size=
'80'
/><input type=
"button"
onClick=
"selectTagOK()"
value=
"确定选择"
/> </div>
Copy after login
5. Find
in the Tag list
1
<a href=
"../tags.php?/<?php echo urlencode($fields['tag']); ?>/"
target=
"_blank"
>{dede:field.tag /}</a>
Copy after login
Change it to:
1
2
<a href=
"../tags.php?/<?php echo urlencode($fields['tag']); ?>/"
target=
"_blank"
>{dede:field.tag /}</a>
<a href=
"#"
onclick=
"selectTag('{dede:field.tag /}')"
>[选择]</a>
Copy after login
Usage help:
To modify the page, you can refer to the add page to add js code.