In a Web Application and Mobile (hybrid), how to know which this platform running?
needed depending on the platform to change the CSS to suit the size of the font.
for example the DbGrid
Hi
You can try this js code to check platform. Add MainForm's Script properties.
- var userAgent = navigator.userAgent || navigator.vendor || window.opera;
- if( userAgent.match( /iPad/i ) || userAgent.match( /iPhone/i ) || userAgent.match( /iPod/i ) )
- {
- //call your css in here for ios
- }
- else if( userAgent.match( /Android/i ) )
- {
- //call your css in here for android
- }
- else
- {
- //call your css in here for other
- }
- }
But why do you check platform? You can change css rules using media queries in css.
For example
- @media screen and (min-width: 480px) {
- body {
- background-color: lightgreen;
- }
- }
also you can create an hybrid project. Examine Demos/Touch/Hybrid demo.
And you can change layout on clientside. Examine Demos/Desktop/Clientside Alignment - ... demos.
On server side you can use :
- UniApplication.UniPlatform: TUniPlatforms
- TUniPlatform = (upDesktop, upMobile, upPhone, upTablet, upAndroid, upiPhone, upiPad, upiPod, upiOS);
- TUniPlatforms = set of TUniPlatform;
In a Web Application and Mobile (hybrid), how to know which this platform running?的更多相关文章
- What technical details should a programmer of a web application consider before making the site public?
What things should a programmer implementing the technical details of a web application consider bef ...
- Creating an API-Centric Web Application[转]
Creating an API-Centric Web Application 转自 http://hub.tutsplus.com/tutorials/creating-an-api-centric ...
- Creating a web application.
About creating web GIS applications As you learn and use ArcGIS for Server, you'll probably reach th ...
- Collabration Web Application Screenshot(English Language) Free download now!
The screenshots of english language version collabration web application which is as following: Incl ...
- Web Application Penetration Testing Local File Inclusion (LFI) Testing Techniques
Web Application Penetration Testing Local File Inclusion (LFI) Testing Techniques Jan 04, 2017, Vers ...
- 微软压力测试工具 web application stress
转自 http://www.cnblogs.com/tonykan/p/3514749.html lbimba 铜牌会员 这里给广大的煤油推荐一个web网站压力测试工具.它可以用来模拟多个用户操作网 ...
- 使用Microsoft Web Application Stress Tool对web进行压力测试
Web压力测试是目前比较流行的话题,利用Web压力测试可以有效地测试一些Web服务器的运行状态和响应时间等等,对于Web服务器的承受力测试是个非常好的手法.Web 压力测试通常是利用一些工具,例如微软 ...
- 实验环境里新创建成功的web application却在浏览器中返回404错误
刚刚翻笔记翻到一些刚学SharePoint时候解决的一些很2的初级问题,本来是有些挣扎该不该把它们记录到这个blog里的?因为担心这些很初级的文章会拉低这个blog的逼格,但是我的哥们善意的提醒了我一 ...
- SharePoint创建web application出现“The password supplied with the username was not correct”错误的解决方法
平台环境 Windows Server 2012 R2 Standard, SharePoint Server 2010, Microsoft SQL Server 2012 (SP1) 问题描述 在 ...
随机推荐
- 方法return外部链接
return new ModelAndView(new RedirectView(url));
- [译]GLUT教程(目录)
http://www.lighthouse3d.com/tutorials/glut-tutorial/ GLUT是OpenGL Utility Toolkit的意思.作者Mark J. Kilgar ...
- JavaScript_DOM编程艺术第二版[阅]
前两年迫于项目的需要,只是拿来JQuery用到项目中,并没有实质上理解javascript(貌似其他人也是这么干的)~ 随着最近几年,得益于Nodejs, React, Vue等,javascript ...
- __must_check必须处理函数返回值
include/linux/compiler-gcc4.h #define __must_check __attribute__((warn_unused_result)) _ ...
- Spring读书笔记-----Spring核心机制:依赖注入
spring框架为我们提供了三种注入方式,分别是set注入,构造方法注入,接口注入.今天就和大家一起来学习一下 依赖注入的基本概念 依赖注入(Dependecy Injection),也称为IoC(I ...
- php 生成下载连接
public function showdownload(){ $file_url=$_GET['url']; $new_name='激活码'; if(!isset($file_url)||trim( ...
- VS使用WEB DEPLOY发布
背景是这样的,公司有两台服务器,平时一台备用,另一台做为主生产机器.当有大量补丁或者安装什么东西需要重启的时候,交其中一台直接关掉IIS,然后重启即可,此时另一台负责处理用户请求. 之前一台服务器一个 ...
- JQuery+Json 省市区三级联动
一.画面以及JS <!DOCTYPE html> <head> <meta http-equiv="Content-Type" content=&qu ...
- mac地址绑定
1.导入第三方类库: <?php /** * FILE_NAME : Macaddr.php * linux平台获取服务器mac地址 * @filesource */ class Macaddr ...
- web安全之SQL注入---第四章 如何进行SQL注入攻击
第四章 如何进行SQL注入攻击1.数字注入2.字符串注入 '# '--