jQWidgets是一個 JavaScript 框架,用於為 PC 和移動設備製作基於 Web 的應用程序。它是一個非常強大且優化的框架,獨立於平台,並且得到廣泛支持。這jqxRadioButtonGroupwidget用於顯示一組單選按鈕,這些單選按鈕擁有API以便對其進行修改。
render()方法用於渲染顯示的jqxRadioButtonGroup。它沒有參數,也不返回任何內容。
用法:
$("#jqxRadioButtonGroup").jqxRadioButtonGroup('render');
鏈接文件:下載jQWidgets從給定的鏈接。在 HTML 文件中,找到下載文件夾中的腳本文件。
<link rel=”stylesheet” href=”jqwidgets/styles/jcustomize qx.base.css” type=”text/css” />
<link rel=”stylesheet” href=”jqwidgets/styles/jqx.energyblue.css”>
<script type=”text/javascript” src=”scripts/jquery-1.11.1.min.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxradiobutton.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxradiobuttongroup.js”></script>
示例 1:下麵的示例說明了 jQWidgets jqxRadioButtonGrouprender()方法。
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href=
"jqwidgets/styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href=
"jqwidgets/styles/jqx.energyblue.css">
<script type="text/javascript"
src="scripts/jquery-1.11.1.min.js"></script>
<script type="text/javascript"
src="jqwidgets/jqxcore.js"></script>
<script type="text/javascript"
src="jqwidgets/jqxradiobutton.js"></script>
<script type="text/javascript"
src="jqwidgets/jqxradiobuttongroup.js"></script>
<script type="text/javascript"
src="jqwidgets/jqxbuttons.js"></script>
<style>
body {
margin-left: 100px;
}
.jqxradiobuttongroup {
margin-left: 50px;
}
</style>
</head>
<body>
<center>
<h1 style="color: green;">
GeeksforGeeks
</h1>
<h3>
jQWidgets jqxRadioButtonGroup render() Method
</h3>
<h4>Choose the correct option:</h4>
<div class='jqxradiobuttongroup'>
GeeksforGeeks is a service oriented company.
</div>
<div class='jqxradiobuttongroup'>
Capgemni is not a service oriented company.
</div>
<div class='jqxradiobuttongroup'>
Microsoft is not a service oriented company.
</div>
<br>
<input type="button" style="margin: 5px;"
id="btn" value="Click here" />
<div id="log"></div>
<script type="text/javascript">
$(document).ready(function () {
$(".jqxradiobuttongroup").jqxRadioButton({
theme: 'energyblue',
});
$("#btn").jqxButton({
width: 180,
theme: 'energyblue',
});
$('#btn').jqxButton().
click(function () {
$('.jqxradiobuttongroup').jqxRadioButton('render');
$('#log').text("Widget rendered!");
});
});
</script>
</center>
</body>
</html>
輸出:
示例 2:下麵是jqxRadioButtonGroup的另一個例子render()jQWidgets 中的方法。
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href=
"styles/jqx.base.css" type="text/css" />
<link rel="stylesheet" href=
"styles/jqx.energyblue.css">
<script type="text/javascript"
src="scripts/jquery-1.11.1.min.js"></script>
<script type="text/javascript"
src="jqxcore.js"></script>
<script type="text/javascript"
src="jqxradiobutton.js"></script>
<script type="text/javascript"
src="jqxradiobuttongroup.js"></script>
<script type="text/javascript"
src="jqxbuttons.js"></script>
<style>
body {
margin-left: 100px;
}
.jqxradiobuttongroup {
margin-left: 50px;
}
</style>
</head>
<body>
<center>
<h1 style="color: green;">
GeeksforGeeks
</h1>
<h3>
jQWidgets jqxRadioButtonGroup render() Method
</h3>
<h4>Choose the correct option:</h4>
<div class='jqxradiobuttongroup'>
GeeksforGeeks is a service oriented company.
</div>
<div class='jqxradiobuttongroup'>
Capgemni is not a service oriented company.
</div>
<div class='jqxradiobuttongroup'>
Microsoft is not a service oriented company.
</div>
<br>
<input type="button" style="margin: 5px;"
id="btn" value="Click here" />
<div id="log"></div>
<script type="text/javascript">
$(document).ready(function () {
$(".jqxradiobuttongroup").jqxRadioButton({
theme: 'energyblue',
});
$("#btn").jqxButton({
width: 180,
theme: 'energyblue',
});
$('#btn').jqxButton().
click(function () {
var r = $('.jqxradiobuttongroup').jqxRadioButton('render');
if (r === null) {
$('#log').text("Null!");
}
else {
$('#log').text("Not null!");
}
});
});
</script>
</center>
</body>
</html>
輸出:
相關用法
- jQWidgets jqxRadioButtonGroup rtl屬性用法及代碼示例
- jQWidgets jqxRadioButtonGroup disabled屬性用法及代碼示例
- jQWidgets jqxRadioButtonGroup enable()用法及代碼示例
- jQWidgets jqxRadioButtonGroup val()用法及代碼示例
- jQWidgets jqxRadioButtonGroup disable()用法及代碼示例
- jQWidgets jqxRadioButtonGroup destroy()用法及代碼示例
- jQWidgets jqxRadioButtonGroup theme屬性用法及代碼示例
- jQWidgets jqxRadioButton boxSize屬性用法及代碼示例
- jQWidgets jqxRadioButton animationHideDelay屬性用法及代碼示例
- jQWidgets jqxRadioButton render()用法及代碼示例
- jQWidgets jqxRadioButton check()用法及代碼示例
- jQWidgets jqxRadioButton focus()用法及代碼示例
- jQWidgets jqxRadioButton hasThreeStates屬性用法及代碼示例
- jQWidgets jqxRadioButton groupName屬性用法及代碼示例
- jQWidgets jqxRadioButton uncheck()用法及代碼示例
- jQWidgets jqxRadioButton animationShowDelay屬性用法及代碼示例
- jQWidgets jqxRadioButton height屬性用法及代碼示例
- jQWidgets jqxRadioButton theme屬性用法及代碼示例
- jQWidgets jqxRadioButton checked屬性用法及代碼示例
- jQWidgets jqxRadioButton rtl屬性用法及代碼示例
- jQWidgets jqxRadioButton destroy()用法及代碼示例
- jQWidgets jqxRadioButton enable()用法及代碼示例
- jQWidgets jqxRadioButton enableContainerClick屬性用法及代碼示例
- jQWidgets jqxRadioButton val()用法及代碼示例
- jQWidgets jqxRadioButton disable()用法及代碼示例
注:本文由純淨天空篩選整理自nidhi1352singh大神的英文原創作品 jQWidgets jqxRadioButtonGroup render() Method。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。