Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/372.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 车身-内联<;风格>;及<;脚本>;在wordpress中使用-安全使用?_Javascript_Php_Css_Wordpress - Fatal编程技术网

Javascript 车身-内联<;风格>;及<;脚本>;在wordpress中使用-安全使用?

Javascript 车身-内联<;风格>;及<;脚本>;在wordpress中使用-安全使用?,javascript,php,css,wordpress,Javascript,Php,Css,Wordpress,我有一系列的模板,我把它们合并到一个滑块中 它将使用模板系统包含在各个区域中 因为这些都是从一个在线库中获取的,所以我发现合并他们直接提供的模板是非常有用的 然而,包括样式和javascript似乎会产生问题 例如: <?php global $slider, $img_path; ?> <script> jssor_<?php echo $slider; ?>_starter = function (containerId) {

我有一系列的模板,我把它们合并到一个滑块中

它将使用模板系统包含在各个区域中

因为这些都是从一个在线库中获取的,所以我发现合并他们直接提供的模板是非常有用的

然而,包括样式和javascript似乎会产生问题

例如:

<?php 
 global $slider, $img_path;
?>
<script>
    jssor_<?php echo $slider; ?>_starter = function (containerId) {

        var options = {
            $DragOrientation: 3,                                //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
            $SlideDuration: 500,                                //[Optional] Specifies default duration (swipe) for slide in milliseconds, default value is 500

            $ArrowNavigatorOptions: {                       //[Optional] Options to specify and enable arrow navigator or not
                $Class: $JssorArrowNavigator$,              //[Requried] Class to create arrow navigator instance
                $ChanceToShow: 2,                               //[Required] 0 Never, 1 Mouse Over, 2 Always
                $AutoCenter: 2,                                 //[Optional] Auto center arrows in parent container, 0 No, 1 Horizontal, 2 Vertical, 3 Both, default value is 0
                $Steps: 1                                       //[Optional] Steps to go for each navigation request, default value is 1
            }
        };

        var jssor_<?php echo $slider; ?> = new $JssorSlider$(containerId, options);
    };
</script>
<!-- Jssor Slider Begin -->
<!-- You can move inline styles to css file or css block. --> 
<div id="<?php echo $slider; ?>_container" style="position: relative; width: 600px;
    height: 300px; overflow: hidden;">

    <!-- Slides Container --> 
    <div u="slides" style="cursor: move; position: absolute; left: 0px; top: 0px; width: 600px; height: 300px;
        overflow: hidden;">
        <div><img u="image" src="<?php echo $img_path; ?>/photography/002.jpg" /></div>
        <div><img u="image" src="<?php echo $img_path; ?>/photography/003.jpg" /></div>
        <div><img u="image" src="<?php echo $img_path; ?>/photography/004.jpg" /></div>
        <div><img u="image" src="<?php echo $img_path; ?>/photography/005.jpg" /></div>
    </div>

    <!-- Arrow Navigator Skin Begin -->
    <style>
        /* jssor slider arrow Navigator Skin 18 css */
        /*
        .jssora18l              (normal)
        .jssora18r              (normal)
        .jssora18l:hover        (normal mouseover)
        .jssora18r:hover        (normal mouseover)
        .jssora18ldn            (mousedown)
        .jssora18rdn            (mousedown)
        */
        .jssora18l, .jssora18r, .jssora18ldn, .jssora18rdn
        {
            position: absolute;
            cursor: pointer;
            display: block;
            background: url(<?php echo $img_path; ?>/a18.png) no-repeat;
            overflow:hidden;
        }
        .jssora18l {
            background-position: -16px -45px;
        }

        .jssora18r {
            background-position: -76px -45px;
        }

        .jssora18l:hover {
            background-position: -136px -45px;
        }

        .jssora18r:hover {
            background-position: -196px -45px;
        }

        .jssora18ldn {
            background-position: -256px -45px;
        }

        .jssora18rdn {
            background-position: -316px -45px;
        }
    </style>
    <!-- Arrow Left -->
    <span u="arrowleft" class="jssora18l" style="width: 29px; height: 29px; top: 123px; left: 8px;">
    </span>
    <!-- Arrow Right -->
    <span u="arrowright" class="jssora18r" style="width: 29px; height: 29px; top: 123px; right: 8px">
    </span>
    <!-- Arrow Navigator Skin End -->
    <a style="display: none" href="http://www.jssor.com">javascript</a>
    <!-- Trigger -->
    <script>
        jssor_<?php echo $slider; ?>_starter('<?php echo $slider; ?>_container');
    </script>
</div>

jssor_u_starter=功能(集装箱ID){
变量选项={
$DRAGORIENTION:3,//[可选]拖动幻灯片的方向,0不拖动,1水平,2垂直,3任意,默认值为1(请注意,$DISPLAYPIGES大于1或停车位置不为0时,$DRAGORIENTION应与$PLAYORIENTION相同)
$SlideDuration:500,//[可选]指定幻灯片的默认持续时间(以毫秒为单位),默认值为500
$ArrowNavigatorOptions:{//[可选]用于指定和启用或不启用箭头导航器的选项
$Class:$jssorarrowsnavigator$,//[Required]类创建箭头导航器实例
$ChanceToShow:2,//[必需]0从不,1次鼠标悬停,2次始终
$AutoCenter:2,//[可选]父容器中的自动居中箭头,0个,1个水平,2个垂直,3个两者,默认值为0
$Steps:1//[可选]每个导航请求的步骤,默认值为1
}
};
var jssor=新的$JssorSlider$(containerId,选项);
};

这是从-从未见过的属性。它不会伤害。无论如何,您可以将内联样式移动到css文件中。“u”属性用于jssor识别html元素的用法。这是自定义属性,为了获得更好的体验,您可以使用“data-u”代替。