标签:rem style move mob cli name cccccc word func
代码
<tr>
<td width="30%">
案件类型:
<select name="crimObjectCode" id="crimObjectCode" style="padding: 0px 8px;outline: none;margin-left:4px;width:150px; height:32px; border: 1px solid #cccccc; border-bottom: 1px solid #cccccc">
<option value="">请选择案件类型</option>
<option value="盗窃案">盗窃案</option>
<option value="抢劫案">抢劫案</option>
<option value="侵占案">侵占案</option>
<option value="叛逃案">叛逃案</option>
<option value="伪证案">伪证案</option>
<option value="失火案">失火案</option>
<option value="重婚案">重婚案</option>
<option value="虐待案">虐待案</option>
</select>
<input type="button" value="+" onclick="addKeywords(‘crimObjectCode‘, ‘caseKeywords‘);"/>
</td>
<td width="70%">
<span id="caseKeywords" class="spspan"></span>
</td>
</tr>
//函数
function addKeywords(a,b){
var spanval=$(‘#‘+a).val();
if(){
if(b==‘year‘){
var str="";
str=‘<a title=‘删除‘ onclick="removeKey(this)" >‘+spanval+‘年</a>‘;
}else{
str=‘<a title=‘删除‘ >‘+spanval+‘</a>‘;
}
$(‘#‘+b).append(str);
}else{
alert(‘错误‘);
}
}
function removeKey(obj){
$(obj).remove();
}
标签:rem style move mob cli name cccccc word func
原文地址:http://www.cnblogs.com/daiwenru/p/7279415.html