重复性属性的Javascript或jQuery [英] Javascript or jQuery of repeatdirection property

查看:49
本文介绍了重复性属性的Javascript或jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在javascript或jquery中编写以下语句?
RadioButtonList1.RepeatDirection = RepeatDirection.Horizo​​ntal

How to write the following statement in javascript or in jquery?
RadioButtonList1.RepeatDirection = RepeatDirection.Horizontal

推荐答案

没有这样的元素;当然在HTML中也没有这样的属性.该构造是ASP.NET的构件.当转换为HTML时,此控件由真实的" HTML radio元素组成,请参见:
http://www.w3schools.com/jsref/dom_obj_radio.asp [ http://docs.jquery.com/Plugins/Authoring [
There is no such element; and of course no such attribute in HTML. This construct is the artifact of ASP.NET; when translated to HTML, this control is composed of "real" HTML radio elements, please see:
http://www.w3schools.com/jsref/dom_obj_radio.asp[^].

So, you cannot operate the properties of this control in JavaScript, because it is used in HTML.

Also, you cannot ask about JavaScript or jQuery — jQuery is JavaScript, just a JavaScript library.

If you really want to manipulate such categories as repeat direction in JavaScript, you probably have only one possibility: to create the whole component in JavaScript and provide some property similar to the ASP.NET. On adequate way of doing this is the jQuery plug-in; see:
http://docs.jquery.com/Plugins/Authoring[^].

However, I have a feeling that this is not what you really want. I suspect that your problem is lack of understanding of how server and client parts of a Web application work together and/or how HTTP works. That''s why it''s very important that you start with explanation of your ultimate goal. If you''re trying to go in wrong direction but explain your ultimate goal, the chances are, you can get a useful advice. Not if you keep silence about it.

—SA


<script type="text/javascript">


(功能(){
(document).ready(function () {


这篇关于重复性属性的Javascript或jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆