本文介绍了对齐文字问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一张表格,用过。在Internet Explorer中,表单正确呈现。但是在Chrome和Mozilla中,文本格式不正确。见图。我有一个使用的代码。见下文。有人可以协助吗?
< script src =" https://code.jquery.com/jquery-1.12.4.min.js"类型= QUOT;文本/ JavaScript的">< /脚本>
< script type =" text / javascript">
$(function(){
$(&#;#WebPartWPQ2 table table tr> td> div:contains('Tech Notes')")。nearest('tr')。hide();
$ .ajax({
url:_spPageContextInfo.webAbsoluteUrl +" / _ api / web / sitegroups / getByName('IMOMembers')/ Users?$ filter = Id eq" + _spPageContextInfo.userId,
方法:"GET",
标题:{"接受":" application / json; odata = verbose"},
成功:函数(数据){
if (data.d.results.length!= 0){
$(&#;#WebPartWPQ2 table table tr> td> div:contains('Tech Notes')")。nearest('tr')。show ();
}
}
});
});
< / script>
< style>
.alignCenter {
text-align:-moz-center!important;
}
.alignRight {
text-align:-webkit-center!important;
}
< / style>
Lee Mossolle
解决方案
I Have a form, that is used. In Internet Explorer the form renders correctly. However in Chrome and Mozilla, the text is incorrectly formatted. See image. I have a code that is used. See below. Can someone assist?
<script src="https://code.jquery.com/jquery-1.12.4.min.js" type="text/javascript"></script> <script type="text/javascript"> $(function () { $("#WebPartWPQ2 table table tr>td>div:contains('Tech Notes')").closest('tr').hide(); $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/sitegroups/getByName('IMOMembers')/Users?$filter=Id eq " + _spPageContextInfo.userId, method: "GET", headers: { "Accept": "application/json; odata=verbose"}, success: function(data){ if(data.d.results.length!=0){ $("#WebPartWPQ2 table table tr>td>div:contains('Tech Notes')").closest('tr').show(); } } }); }); </script> <style> .alignCenter { text-align: -moz-center!important; } .alignRight { text-align: -webkit-center!important; } </style>
Lee Mossolle
解决方案
这篇关于对齐文字问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!